Hacker News new | ask | show | jobs
by loeg 3354 days ago
C programmer here. Cello isn't really C. So as long as you're using something that isn't quite C, and you want an object model, I think "why not C++?" is a reasonable question.
3 comments

Looks like C to be. Just some macros and function calls.
If someone showed me a sample of the code, out of context, I wouldn't have guessed it was C. Maybe Javascript (with the "var" declarations).
Why would you say that "Cello isn't really C"?
It's arguable that extensive use of macros and faux-dynamic-typing violate the ideology of C that makes it simple and predictable.
I'd remove the “faux”. Cello is dynamically typed.
Then you could say that just using void-pointers in C that C is also dynamically typed.
In C you would only use void pointers very occasionally, to work around the lack of generics/templates in data structures. Most of the time, objects have types. In Cello, everything is a void pointer. Limited as it is, compiler type checking in C is still valuable.
Static typing gives types to expressions (in the program text), not to objects (at runtime).
Not void pointers per se, but if you use runtime information to determine how to interpret the data pointed by a void pointer, that's dynamic typing, yes.
But it didn't look to me like Cello was an object model. To me, it felt more like Perl or Python than C++ - more like a dynamic scripting language.