Object-Functional

Typed Concurrent Programming with Logic Variables

Typed Concurrent Programming with Logic Variables

We present a concurrent higher-order programming language called Plain and a
concomitant static type system. Plain is based on logic variables and computes
with possibly partial data structures. The data structures of Plain are procedures, cells, and records. Plain's type system features record-based subtyping, bounded existential polymorphism, and access modalities distinguishing between reading and writing.

You may want to compare this with The Oz Programming Model (OPM), which

... is a concurrent programming model subsuming higher-order functional and object-oriented programming as facets of a general model. This is particularly interesting for concurrent object-oriented programming, for which no comprehensive formal model existed until now. The model can be extended so that it can express encapsulated problem solvers generalizing the problem solving capabilities of constraint logic programming.

Another paper on OPM is The Operational Semantics of Oz.

In short, the model of Plain is based on that of Oz with the main differences being:

  1. Plain statically types programs using a type system with subtyping, while Oz is latently typed.
  2. Therefore Plain chooses to drop support for unification in favor of a single-assignment operation.

OCaml 3.0.9

The most recent version of Objective Caml is 3.09.0. It was released on 2005-10-27.

Some of the highlights in release 3.09 are:

  • Introduction of private row types, for abstracting the row variable in object and variant types.
  • Added warnings Y and Z for local variables that are bound but never used.
  • More portable implementation of the -pack option to ocamlopt.

For more information, please consult the comprehensive list of changes.

Haskell's overlooked object system

A "major new release" from Oleg Kiselyov and Ralf Lämmel:

In a first phase, we demonstrate how far we can get with object-oriented functional programming, if we restrict ourselves to plain Haskell~98. In the second and major phase, we systematically substantiate that Haskell~98, with some common extensions, supports all the conventional OO features plus more advanced ones, including first-class lexically scoped classes, implicitly polymorphic classes, flexible multiple inheritance, safe downcasts and safe co-variant arguments. Haskell indeed can support width and depth, structural and nominal subtyping. We address the particular challenge to preserve Haskell's type inference even for objects and object-operating functions. Advanced type inference is a strength of Haskell that is worth preserving. Many of the features we get "for free": the type system of Haskell turns out to be a great help and a guide rather than a hindrance.

You can download the paper and OOHaskell from here.

Variables as Channels

Method mixins - written by Erik Ernst

It is quite common to describe languages with mutable state as machine-oriented, and to describe functional, logical, and other kinds of `declarative' languages as more abstract, liberated from the old-fashioned attachment to bits and memory cells. This opinion was brought to prominence with the 1977 Turing Award
speech by John Backus [...] We must recognize that the functional and other paradigms have have produced deep and useful results. However, it is our opinion that imperative languages, especially object-oriented ones, are being widely used because of their
inherent power and not because programmers are nostalgic about
writing programs in assembly language. It is not a question of abstraction or hardware concreteness, it is about safety and freedom. Restrictive communication topologies bring safety, and flexible topologies bring freedom. To substantiate this, we need to consider variables and similar concepts as communication channels, thereby making them comparable.

This paper provides an interesting perspective on the role of variables in programming. It is about a construct called method mixins, but the discussion about the role of variables in Sec. 2 is relatively independent of the specific construct proposed in the paper:

O'Haskell - a functional object-oriented concurrent PL

We mentioned O'Haskell previously on LtU, but a recent discussion of OOP vs. FP vs. everything made be to believe that it's worth to remember this (unfortunately unsupported) programming language.

It's instructive to read the rationale for this PL, as it helps to see how OOP and FP solve similar tasks in orthogonal (or just different) ways.

Note that the author of O'Haskell abandoned it in favor of Timber.

OO Programming Styles in ML

OO Programming Styles in ML, Bernard Berthomieu.

It is shown that the essential OO concepts and idioms, including inheritance and dynamic dispatch, can be encoded in this well understood framework, without requiring any operational or typing extensions of ML...

[The encodings] do not rely on subtyping and subsumption, but on an encoding of inheritance polymorphism into paramteric polymorphism.

This isn't new (it is dated March 2000), but seems interesting.

The ML module language put to good use!

Thanks Henry!

XML feed