4 ms·
When I read this stuff, like what to ban, what to allow and so forth, it's impossible for me to avoid thinking that actually C++, Objective-C, and D, are not en
by antirez 16y ago
When I read this stuff, like what to ban, what to allow and so forth, it's impossible for me to avoid thinking that actually C++, Objective-C, and D, are not enough. We are still in a world where a "better C" is needed as the available choices are not good enough.
- protomyth 16y agoOut of curiosity, how did you lump Objective-C and D into this. I haven't heard of people banning the use features of Objective-C and D like they do with C++. //well, except where the platform doesn't support the feature (e.g. iPhone::Garbage Collection).
- antirez 16y agoI don't think the reasons are the same. C++ is too complex, and while it's true that exploiting advanced features it's possible to do a great deal of things, it's not hard to imagine an object system for C much simpler and still able to achieve most of the benefits. I think Objective-C is taken alive by the fact that Apple is pushing it forward, IMHO this is already telling enough about it. A few things are nice but it's too verbose, the syntax is not nice, some semantic is tricky (memory management is confusing for newcomers), and I feel in it a strange mix of high level features with other things that are too low level or not well conceived (like @synthesize). D has other problems (like two different flavors and other stuff related to the fact it's pretty recent) but I think it does not qualify as the "better C" that can really be accepted in short time, as the difference with C is too strong and it's not a strict superset of C. What I think it's needed is a C with classes without fancy features and with a solid standard library that makes good use of the new OOP stuff. The layer that's enough to avoid to write structures and function pointers to fake objects, just that tiny layer, but done right. Not claiming this is easy at all, but probably there are very little people interested in solving this problem right now.
- scott_s 16y agoI think Go might become a viable alternative to C for systems programming.
- jfr 16y agoI think that one of the requirements that makes Go unsuitable as a C replacement in this specific case is the presence of the garbage collector. We need a language that we could use to write the garbage collector itself. It has to be a non-GC'd language or at least allow you to use it without linking to the GC.
- scott_s 16y agoI can see that being a problem if you were writing a garbage collector, but that's not a problem in this particular case (a C/C++ compiler).