3 ms·
By “CoffeeScript for C“, I think Onr means not supporting all of CoffeeScript’s features in C, but rather making a language that is very much like C, but better
by roryokane 14y ago
By “CoffeeScript for C“, I think Onr means not supporting all of CoffeeScript’s features in C, but rather making a language that is very much like C, but better. So CoffeeScript for C wouldn’t try to implement `@foo` to mean `this.foo`, since there is no `this` in C. Rather, it would look at the common idioms in C that are more verbose than they need to be and shorten them.
CoffeeScript for C would probably use semantic whitespace, like normal CoffeeScript. Maybe it would make writing types easier – it would support a syntax for types that doesn’t require the use of http://www.cdecl.org/ http://www.cdecl.org/. It would still try to be “just C”, so it wouldn’t support much higher-level features like function closures.
- tmzt 14y agoYou might consider something like Vala (valac), which produces glib/gobject c code from a c# like syntax.