Prop: a C++ based pattern-matching language

Prop is a source-level extension to C++ which brings in discriminated unions and pattern-matching to the language while retaining all features of C++, thus allowing to freely mix Prop and C++ code in a single project. Prop compiler parses and converts Prop-specific constructions to valid C++.

Unfortunately, Prop is long not-maintained and the last version (released in 2002) doesn't compile with modern C++ compilers. Also there is no Makefile for MSVC. I managed to compile and run prop successfully with msvc2005 and gcc3. The code is in the git repository.

Example. Consider simple.pcc and the generated simple.cc. Notice that Exp member in Q datatype is declared as raw pointer and is not destroyed by dtor. Thus it is a memory leak if no special treatment is given. There is an optional GC in Prop though, but I didn't even try to compile it, because I needed to minimize external code in runtime. This problem stops me from using Prop, it's a pity.


2009-01-02