Aspartame v0.0.2
Aspartame is a wannabe-Cocoa C++ library by Joachim Bengtsson and David Sveningsson.
It is currently in the process of being extracted piece-by-piece from Rymdvarelser Mot Soldater.
Example
AutoreleasePool *pool = alloc(AutoreleasePool)->init();
Dictionary *foo = dict(s("Hej"), s("Foo"),
s("Nisse"), num(3),
NULL);
ConPrint("%@", foo);
pool->release();
// OUTPUTS:
// <Dictionary(2) at 0x300710> {
Hej: Foo
Nisse: 3.000000
// }
dict is short for Dictionary::dictionaryWithKeysAndObjects(), num is short for Number::numberWithReal(), s is short for String::stringWithCString(), sf is short for String::stringWithFormatString().
Features
Apart from the common Cocoa classes like Object, String, Dictionary, Array, AutoreleasePool and Number, it features optional bindings with Python, thread and mutex abstractions, a pretty neat memory pool, a task scheduler (like NSOperationQueue in Leopard), JSON support, settings management and the most over-engineered logging facility in the history of mankind.
Installation
Linux
cd Projects/Linux
./configure
make
make install
MacOS
Either
- do it the Linux way,
- open Projects/MacOS/Aspartame.xcodeproj and compile away, or
- use the prebuilt .framework or .dylib in Prebuilt in the download
Windows
Neither David nor I run Windows, but making a VS.NET project file should be trivial. Just make sure to define the macro ASPARTAME_DISABLE_MEMPOOL and optionally WITH_JSON.

