Re:BASIC for OS-Development?
Posted: Tue Aug 26, 2003 3:05 am
Well, I learned (in that order) BASIC, Assembler, ARexx, C, Java, C++, and Perl, and I have to say that, out of all of those, C++ wins in just about every department hands down, with Java getting the leftovers and Assembler scoring two measly points (code size, code efficiency) in the hands of a pro.Schol-R-LEA wrote: I must admit, I've no great love of the language; I've come to see it as combining all the worst aspects of C with about 75% of the worst qualities of Ada (fortunately, the C++ language group has yet to embrace anything so absurd as the Ada rendevous mechanism), in a way that cancels out most of the advantages of both.
I haven't found the combination of core C++ features in any other language yet:
* compiled language with close-to-C performance;
* availability of compilers for virtually any platform;
* can create custom datatypes (classes) that behave like inbuild ones (including e.g. x == y);
* generic programming (templates);
* exception handling;
* can interface C code without major hassles;
* availability of source-level debuggers.
I grant you that C++ isn't a beauty. Like Stroustrup said, "somewhere within C++, there is a better, cleaner language struggling to get out". But that language isn't C, and it isn't Java either.
It's the adaptability of C++ I like so much. You can take plain C code or code using namespaces and classes; you can add multiple inheritance (or rather not ), you can use templates (or not). You can write code that calls by value, or code that calls by reference.That depends on what you consider 'powerful'. There are many areas where Common Lisp or Smalltalk are far more expressive.
Except for first-level objects (modifying a class definition by runtime), C++ just owns everything there is in OO or procedural programming. You can do.
That is, of course, also its greatest weakness.
It sure as hell won't be Java. If there's one feature in C++ that inspires those working on its successor, it's "templates".All of this is moot; C++ for all it's faults is a good language, and until a suitable replacement arises, it will be around for quite a while. While Java may end up being that replacement, it will need to mature as a system for some time before that happens.