It's all C99 compatible, and yet it appears to have support for closures, message passing, multimethods, generics, autorelease pools, exceptions, KVO/KVC, pre and post conditions for methods, and is apparently faster than Objective-C (see benchmarks in the paper).
A few years ago I tried to mangle COS into compiling on Microsoft Visual C++. The problem is that COS's syntactic magic relies on C99 features like variadic macros, and MSVC still doesn't implement the ISO C99 standard.
Microsoft does have their own incompatible implementations of the necessary features in C++ mode, so theoretically it should be possible to adapt COS to build on both C99 and MSVC++. I never got it working, though. (I didn't spend many evenings on it either...)
Don't have time to investigate the C99 magics in COS. But MSVC++'s implementation of several c99 features are not compatible with normal interpretations (gcc, icc and clang).
6 comments
[ 1.8 ms ] story [ 19.1 ms ] threadIt's all C99 compatible, and yet it appears to have support for closures, message passing, multimethods, generics, autorelease pools, exceptions, KVO/KVC, pre and post conditions for methods, and is apparently faster than Objective-C (see benchmarks in the paper).
Microsoft does have their own incompatible implementations of the necessary features in C++ mode, so theoretically it should be possible to adapt COS to build on both C99 and MSVC++. I never got it working, though. (I didn't spend many evenings on it either...)