Summary:
While the C++ Standards committee is about midway through formulating the next official version of C++, Chuck ponders the relationship between power and complexity.
The ability to add new comments in this discussion is temporarily disabled.
Most recent reply: September 15, 2005 10:51 PM by
Bob
|
> 2. Java provides an ideal language that is easy to use > like Python and runs as well as C++. Therefore one > language can be both your beginners/testers language and > your powerful developers language.
I don't quite see it that way. At the collee I teach at, we switched back to C++ from Java for beginners because Java forces objects on you too soon. I find it easier to start where students are at (everyone and do simple arithmetic and use library components such as vector and string), and introduce objects after they have grasp the idea of simple programs. Of course, Python is ideal for this.
|
|
|
> I don't quite see it that way. At the collee I teach at, > we switched back to C++ from Java for beginners because > Java forces objects on you too soon. I find it easier to > start where students are at (everyone and do simple > arithmetic and use library components such as vector and > string), and introduce objects after they have grasp the > idea of simple programs. Of course, Python is ideal for > this.
I don't really get your comment, Java does automatic boxing an unboxing therefore you can use Integer, List< Integer > etc. including arithmetic (the only infix operator not available is ==). I am not sure what Python does but many scripting languages work the same way as Java and do automatic boxing and unboxing, so this is no different.
|
|
|
class Foo { public static void main(String[] args) { System.out.println("Hello"); } }
What's a class? Why do I need Foo? What's "public"? What's "static"? What's "String[]"? This noise turns off beginners. It's much easier to say:
>>> "Hello" Hello
or even to say
#include <iostream> int main() { std::cout << "Hello"; }
Java forces classes and objects on you in the very first minute. This is not natural for newbies. Our students have performed much better since we made the switch back to C++. We teach Java - just not to beginners. We start where they are - doing simple computations and string processing - everyone knows reading, writing, and arithmetic already. Objects come in their time, but not before. But let's not engage in the "object first or not" discussion here. That's off topic.
|
|
|
I am surprised you think there is much in it, the 'noise' level seems about the same in the C++ code and the Java code. When I have taught Java I have not found the 'noise' to be much of an issue. People seem happy with deffering all the details and using a bit of 'boiler plate' for the time being so long as you assure them that you will explain it and that it won't remain a black box. If interaction and little 'noise' is your issue try: http://www.beanshell.org/home.htmlfor a scripting version of Java and even easier try: http://www.bluej.org/which allows you to write and debug much of the code graphically!
|
|
|
Howard, it's obviously not. I'm glad that you are happy with your choice of Java, but maybe your love of it stops you from objectively counting statements, scopes and programming paradigms.
As we're on simplicity, I think the lowest noise hello world is to type into a text file:
print "hello world"
And then run it without compilation. I can think of at least 2 scripting languages that start with 'P' that can do this, and I'd recommend one of those.
|
|