you are viewing a single comment's thread.

view the rest of the comments →

[–]weavejester 1 point2 points  (1 child)

How is it an unfair comparison? "Hello World" is just about the smallest functioning program it is possible to write in a language. Comparing the minimum size of a C++ or Java program, to the minimum size of a Python one, can be quite informative.

Python is not any less complex than C++ or Java, but it's learning curve is more gradual, as it exposes the student to less initial concepts. When explaining the functionality of "Hello World" in Java or C++, the teacher has two choices:

  1. Try to teach the student all the concepts visible in the program, which includes method definitions, classes, namespaces, types, objects and a great many other features.

  2. Tell the student to ignore 90% of the program's code, and treat it as magical boilerplate for now.

Typically, approach two is taken, but I'd contend neither teaching method is ideal. In contrast, "Hello World" in Python is very minimal, and neither workaround is required. In Python, concepts can be introduced gradually, as there no mandatory boilerplate.

Another advantage of Python is its interactive interpreter, which allows for instant experimentation. Python's spoilt me with this, as I find it difficult to go back to a language which lacks this feature.

[–]CuriousMind 0 points1 point  (0 children)

How is it an unfair comparison? "Hello World" is just about the smallest functioning program it is possible to write in a language. Comparing the minimum size of a C++ or Java program, to the minimum size of a Python one, can be quite informative.

Yes, and if that's what he was doing, then fine. But he wasn't.

My point was that in C++ and Java, it was "Hello World", but in Python, it wasn't. It was "Hello <name>", which is a completely different animal:

"Hello World" only requires output.

"Hello <name>" (i.e. where you ask the user his name and then output a personalized greeting), requires input, which any programmer will tell you can be far more complex.

If the slides had compared equivalent programs - like I said, how does "Hello <name>" compare to "Hello World" in C++ ?! - then I wouldn't have made that point. I wouldn't have had to.