3 ms·
Yes, this is one of my pet peeves as well. And what I think it's also important: don't ask for the key if the door doesn't need to be opened. The examples on
by raverbashing 5y ago
Yes, this is one of my pet peeves as well.
And what I think it's also important: don't ask for the key if the door doesn't need to be opened.
The examples on the text about Python and OOO are on point. Yes, people would reinvent classes if they needed, but the great thing about classes (and type annotations) are that they're optional
Compare with Java where you need a 'static void main' method inside a class just to begin. Why? Not even C++ requires that.
Do help them keep in their lanes but keep simple things simple.
- fendy3002 5y ago> Java where you need a 'static void main' method inside a class just to begin C# too, but they remove the necessities to use static main for entrypoint, starting from C#9
- Banana699 5y agoThe sheer irony is that "lite" object systems like python and ruby are actually purer and more faithful to the ideals of OOP (as envisioned by Alan Kay and those with him and before him) than Java can ever be, with its ugly and unnecessary seperation between classes and primitives, a completely irrelevant distraction that is primarily a VM optimization detail which only compilers and other bytecode producers or consumers should have known or cared about. In python, nearly everything is a PyObject, data, code, source code files (which are just modules, which are just objects). It's highly misleading to name the things you get by calling a class objects, it implies this is somehow special, as if dicts and lists and ints, and classes themselves for crying out loud, aren't objects as well. This is why I cringe so much when people associate OOP with Java bloat, the language is just unimaginably badly designed, this has nothing to do with OOP. You don't even have to be dynamic like Python and Ruby to be a good OOP system either, although that is a particularly low-friction path pioneered by smalltalk and lisp, but languages like Scala and Kotlin prove you can be highly static, highly OOP, and beautiful to read and write without the sheer amount of paperwork Java heaps on you.
- astrange 5y agoIt's not really an optimization detail, it's because Java doesn't have user-defined value types. The primitives are there because they're value types copied from C. (Java is a memory-safe variant of Objective-C with all the interesting features removed.)