|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
My team switched to Java this year, primarily because it is the language taught in high school CS courses around here, and I am very glad we did. It is so nice to not have to explain memory management to the students or spend hours debugging a null pointer problem when the best the compiler can do is say, "something went wrong somewhere...probably." Most of the things you do in Java just "make sense," with very few syntactic quirks that seem unnecessary or silly to new students.
My main gripe with C++ is that it gives you far too many options. Should you pass by reference, pointer, or value? Here a hint; none of the three options do everything you want. The 2010 revision of the C++ spec will add another one: move reference (denoted by var&&)...this is getting a bit ridiculous. When defining a new class, you better write the copy constructor, destructor, and assignment operator (and move constructor in the new revision), or the compiler will do it for you (almost always incorrectly). Be sure to maintain exception safety in your constructors - 20% of my favorite C++ book is devoted to that subject. Put declarations in the header file and definitions in the source file; unless they're inline or templates.
And if that's not complex enough for you, with a Turing-complete preprocessor and template system, you can effectively rewrite the language (see: Boost libraries).
Java seems to be much better in the straightforwardness regard. Although I wish we weren't limited to CLDC 1.1: it has some idiosyncrasies of its own. ((Integer)vector.elementAt(index)).intValue is not an intuitive way of extracting an int from an array.
__________________
Go directly to queue. Do not pass pit.
|