archives

The C Object System (COS)

The C Object System: Using C as a High-Level Object-Oriented Language, Laurent Deniau, arxiv 2010.

The C Object System (COS) is a small C library which implements high-level concepts available in Clos, Objc and other object-oriented programming languages: uniform object model (class, meta-class and property-metaclass), generic functions, multi-methods, delegation, properties, exceptions, contracts and closures. [...]

COS is interestingly built around fast multiple dispatch and delegation. It is implemented by a portable C library (C99 CPP required) and build tool. So, it's roughly a CLOSy GObject. Or a multiple dispatch, pruned Objective-C 1.0. No garbage collector. The exceptions are setjmp. The motivation is large-scale scientific code development and maintenance. LGPL. COS is the successor to Object Oriented C (OOC-2.0) and Object Oriented Programming in C (OOPC). The project currently appears alive, about 3 years old, out of CERN, with ~one developer, perhaps limited use, and no community infrastructure beyond SourceForge CVS.

On top of these concepts, it should be easy to implement high order messages, class-predicate dispatch, multiple inheritance, dynamic inheritance, dynamic classes, adaptive object model, reflection and advanced memory management.

COS homepage. Slides.

Deprecating the Observer Pattern

Ingo Maier, Tiark Rompf, Martin Odersky (2010) PDF

Abstract:
Programming interactive systems by means of the observer pattern is hard and error-prone yet is still the implementation standard in many production environments. We present an approach to gradually deprecate observers in favor of reactive programming abstractions. Several library layers help programmers to smoothly migrate existing code from callbacks to a more declarative programming model. Our central high-level API layer embeds an extensible higher-order data-flow DSL into our host language. This embedding is enabled by a continuation passing style transformation.

There's very little public discussion yet, but you can grab a snapshot of the code from Ingo's page.

This is the most compelling use of continuations I've seen, and I think it might stand a chance of finally bringing FRP into the mainstream.