6 ms·
Fully agree with this. The fact that the "hello world" program involves the use of several keywords (public static void main String[] args System.out.println) t
by abhisuri97 5y ago
Fully agree with this. The fact that the "hello world" program involves the use of several keywords (public static void main String[] args System.out.println) that students will have no idea about until 1-2 months later is not ideal. Compare that to python "print('hello world')" is very intuitive.
- yeputons 5y agoI don't see much difference between `System.out.println` and `print`. Both should be spelled exactly as they are. You cannot say `write`, `say` or `Print` in Python despite it being somewhat synonym to `print` in English. They are parts of syntax, and any language will have some syntax to learn, and there are always syntactic quirks. Granted, Python has lighter syntax than Java, but I don't think Java is too verbose for beginner's purposes.
- cerved 5y agowhat's System what's out why is there a period, what does that mean what's ln what's pubic what's static what's void what's main what's String[] what's args Java is as verbose as it gets with lots of unnecessary information at a beginner level
- yeputons 5y agoWhy parenthesis? Why is the string quoted? Why I cannot write `print("a") print("b")` on the same line? Why `print`, if it shows on a screen, not a printer? What is `.py`? What is file? Why `write` on a file does something different than `print`? I agree that Java shows you more syntax which is intimidating. But the answer to all these questions for all languages is: "it's a special syntax, you should write it exactly as it is. We will learn more details later in the course". There is literally no need to dive in. You wouldn't dive to variadic functions, builtins and CPython implementation details when asked about the name `print` or how it can take multiple arguments, would you? You get some kind of syntax questions no matter what programming language you teach, even Python. Granted, there may be less with Python in the beginning, but in lots of scenarios the difference is negligible.
- bbarn 5y agoI think AP's point here wasn't that command, it's all of the class structure required to get to the coding. You either have to introduce that as "don't worry about that, it'll come later" or introduce OOP basics on the way to simply stating hello world.
- yeputons 5y agoYes, and I would say "don't worry about that, it'll come later, it's boilerplate". Same as I would do with `import` in Python, actually.