See http://apcentral.collegeboard.com/apc/public/repository/ap-c...
I'm not saying that's a good idea, just that the practice is fairly common. I think they're nuts.
document.write("Hello, world");
or:
alert("Hello, world");
Two lines of overhead counting the script tags.
For all its faults (and they are many) I think I'd argue for Javascript as a first teaching language (maybe focusing on Crockford's "good parts", or maybe some variant like Coffeescript). Minimal overhead. Support for reasonably advanced concepts like objects and anonymous functions. Will run on just about any device the student (or his or her friends own) without having to install anything. Trivial to distribute your creations. Has actual employability value (this, I think, is sole reason Java has become so popular).
I don't want to get bogged down in the argument over strong/weak/dynamic/static typing -- but also don't think it's necessary for a beginning course.
console.log("Hello World");
Fortunately I actually taught myself programming in HS by writing mIRC scripts so I could do cool automation stuff in my spare time, and I had learned a little earlier in some kind of Logo course targeted at elementary-age kids. If it were up to that high-school C++ course to get me into computers, though, I would definitely not have done so...
Personally, I think Pascal was a great choice for those high school courses.
But, as I said, you can still do this just fine in C++ or Java. I think that people tend to place way too much importance on the first language we teach students. What matters far more is the quality of the teaching itself, and the relevance and logical progression of the projects the students have to solve.
And the hello world program for C++ is just as bad as the one for Java, in its own way. You're writing 'cout << "Hello World"' but how long will it be before you teach the students about operator overloading?
Neither of your claims is supported by either paper. Rather, they seem to support my claim: starting language isn't a predictor of success.
Conclusions from the first paper: When final exams were compared for a CS2 course offered before the Python transition with a course after the transition no statistical difference was found. The first CS2 course after the transition contained a mixture of Python-prepared and non-Python prepared students. There was no statistical difference in the performance between those two student groups.
Conclusions from the second paper: We conclude that starting students with Python has not had a negative impact within a C++ based curriculum. It would have been nice to conclude that the Python students did better in these courses, but the evidence does not appear to support that hypothesis.
With that said, I do agree with the authors that exposure to more languages, environments and tools is a good thing, and for that reason, I'd prefer using Python, then switching to C++.
Each class must be in its own file, and the execution starts from "public static void main(String[] args)" inside it. Then you have to deal with complex data types very early: python's set of primitives is much richer, which is great when teaching. Also, doing IO in Java is a pain unless you distribute a library.
To those who think Python's significant whitespace is a problem, I think you need to watch an otherwise intelligent beginner struggle with an error on line 80 because they mismatched their braces on line 20. If you aren't properly indenting your code, it becomes an unreadable mess anyways, so why not enforce it at a language level? And if you think an IDE can do this for you, think again. People just complain that it does things wrong when it indents half their methods by 2 extra tabstops because they missed a brace. They don't really get it, they just get into a feedback loop where they say, "Oh, it won't compile. Let me scan the entire program counting braces" which is a waste of everyone's time. I've seen people go entire semesters without ever learning to write readable indented code.
Or like others have said we could hand-wave it away until later.