Article Discussion
As Simple As Possible?
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.
20 posts on 2 pages.      
« Previous 1 2 Next »
The ability to add new comments in this discussion is temporarily disabled.
Most recent reply: September 15, 2005 10:51 PM by Bob
Chuck
Posts: 32 / Nickname: cda / Registered: February 11, 2003 0:06 PM
Re: As Simple As Possible?
September 4, 2005 3:06 PM      
> 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.
Howard
Posts: 25 / Nickname: hlovatt / Registered: March 3, 2003 1:20 PM
Re: As Simple As Possible?
September 6, 2005 3:54 PM      
> 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.
Chuck
Posts: 32 / Nickname: cda / Registered: February 11, 2003 0:06 PM
Re: As Simple As Possible?
September 7, 2005 3:09 PM      
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.
Howard
Posts: 25 / Nickname: hlovatt / Registered: March 3, 2003 1:20 PM
Re: As Simple As Possible?
September 7, 2005 4:00 PM      
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.html

for 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!
Bob
Posts: 3 / Nickname: hiredgoon / Registered: April 27, 2005 1:18 PM
Re: As Simple As Possible?
September 15, 2005 10:51 PM      
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.
20 posts on 2 pages.
« Previous 1 2 Next »