6 ms·
Also if they are starting out I would recommend a language that enforces better OO (Object Orientated) practices than python, like Java (don’t hate me but it’s
by Zak 16y ago
Also if they are starting out I would recommend a language that enforces better OO (Object Orientated) practices than python, like Java (don’t hate me but it’s true).
I can't say I agree here. I suspect you knew this would trigger some debate.
First of all, the definition of OO is not well established. What defines OO? Is it encapsulation? Inheritance? Message passing? Jonathan Rees discusses the issue in more depth here: http://paulgraham.com/reesoo.html http://paulgraham.com/reesoo.html . Whether OO, by any accepted definition is a Good Thing is also debatable, and beyond the scope of this comment.
More importantly, I think imposing that "good OO practice" on a brand new programmer is a distraction from learning the basics of programming. None of the boilerplate Java requires for a "hello world" program actually has anything to do with printing "hello world" to stdout. The beginner has a great deal of information to absorb, and the meaning of "public static void main()" is an extraneous distraction from what's fundamentally required to make a program work, and arguably not helpful for making programs that are well-structured and easy to understand. If "hello world" requires much more than "print('hello world')", it's not a good language for learning the basics.
- myusuf3 16y agoIf you must know the reason behind that statement, was due to the fact at where I work we use jython, java and python extensively. When I first got there I was rapid prototyping applications for the end user, based on some data that had been structured in Java. While this was available through API I had no inner understanding the objects that I was passing around in python, which you can get away with in python very easy. Which is why I think its bad to get into the habit for beginners. Understood that clutter is a bit extraneous but at the same time necessary, or least until we all move towards simpler languages like python. :)
- Zak 16y agoThat clutter is only necessary in cluttered languages like Java; it is only necessary to learn it if you're using one. It's perfectly safe to put it off until you need to. Passing around objects without having to understand their innards is part of what's generally thought to be good about most definitions of OOP. Being able to understand them is part of learning the language, of course.
- l0nwlf 16y agoAt my workplace I need to code in Java. After programming in Python for 2 years I am simply hating the experience. Nothing to do with OO, but the language is a lot more verbose and I personally find it a bit irksome.