4 ms·
>I don't know a lot of what's out there on the horizon, and there are some efforts to create a better C. Are there any efforts to extend C to add very simple/l
by marze 14y ago
>I don't know a lot of what's out there on the horizon, and there are some efforts to create a better C.
Are there any efforts to extend C to add very simple/light objects, and perhaps string handling?
- jrajav 14y agoThis sounds quite a bit like Objective C.
- bunderbunder 14y agoObjective-C's object model is very heavyweight. Granted, that's what I used to like about it (I haven't worked in it in years). You got to have this very high-level object-oriented language with all sorts of delightful features such as dynamic dispatch, duck typing, and even monkey patching. But you also got to have straight C sitting right there in the same language, and could easily flip back and forth between the two without incurring penalties that TFA mentions such as losing context at a language boundary when you're trying to debug code.
- podperson 14y agoI don't think it's fair to call it heavyweight. It's both high and low level at the same time, which is part of its awesomeness (there are no "methods" -- only messages (symbol names) so you can send objects messages (dynamic, has an overhead) or use a message to get a hard reference to a function pointer ("selector") and call that directly with no overhead (beyond a function call). So you can be nearly as dynamic as JavaScript or Python, or as performant as C without changing languages.
- ripter 14y agoC++ and Objective-C started with this goal. Objective-C started as a pre-processor for C.
- npsimons 14y agoSo did C++.