News for hackers. Stuff that matters.
Re:The faster you unlearn OOP, the better for you and your s... by naasking on Sunday November 25, 2018 @10:50AM (#18527332)
> pattern recognition become more difficult for all but the most experienced programmers.

In fact the opposite is the case. The boilerplate obscures underlying patterns because it forces you to read twice as much to infer the same amount of information. Roughly the same design patterns are used in more expressive languages, just without all the boilerplate. This makes the pattern being employed completely obvious since it's only a few lines of code.

Re:The faster you unlearn OOP, the better for you and your s... by scarface74 on Sunday November 25, 2018 @11:16AM (#18527433)
Once you use a language for awhile you develop boilerplate blindness just like people have developed ad banner blindness.
Re:The faster you unlearn OOP, the better for you and your s... by naasking on Sunday November 25, 2018 @11:23AM (#18527462)
I'm sure, and yet it remains true that you spend a lot more time scanning and scrolling your wheel mouse than is necessary. You can also fit far less context on screen, making debugging and "learnability" harder.
Re:The faster you unlearn OOP, the better for you and your s... by scarface74 on Sunday November 25, 2018 @01:17PM (#18527987)
There is overhead but with that overhead becomes maintainability, type safety, etc.

For me, on one side is Python. No compiler overhead, very little boilerplate, no complicated IDE etc but no type safety and harder to maintain for larger projects and C# with all of the overhead of a heavyweight compiler but the type safety and great IDE makes it perfect for larger projects where multiple people will be working on it simultaneously.

For simple scripting, where can I mentally keep everything in my head and think through how one change will affect everything else, Python is my go to language. For larger projects C#.

I’ve hated all scripting languages I’ve encountered over 20 years, but for some reason I love Python. It’s also a great teaching language.

Re:The faster you unlearn OOP, the better for you and your s... by naasking on Sunday November 25, 2018 @01:28PM (#18528062)
I agree Python is good for teaching, but the maintainability and type safety aren't features of the boilerplate. This is clear when considering languages like OCaml, Haskell and other languages featuring type inference.
Re:The faster you unlearn OOP, the better for you and your s... by dragonwriter on Sunday November 25, 2018 @01:30PM (#18528079)
Python has an external static type checker with type inference.
Re:The faster you unlearn OOP, the better for you and your s... by atoav on Monday November 26, 2018 @12:32AM (#18531310)
I learned Rust after learning Python. I do solve similar problems in Rust as I did in Python.

The single worst thing that python thought me, is that it would be cool/useful to make classes. Some call that a “sea of objects”. When I tried similar concepts in Rust I learn quickly that things started falling apart much faster at a point reached much earlier.

However this was also happening in Python – only much later in the game. This made me realize: instead of focusing on the flow of data and useful abstractions (”blackboxes”) over it, I actually made a lot of classes and objects and tried to pipe them into each other, without giving too much thought on the flow of data.

It felt so reassuring to make a Car-class for car objects, wit a Wheel class for its wheels, that I somehow forgot to think about the actual data that I wanted to work on.

The danger of OOP is IMO that it highly encourages bringing in preexisting patterns of abstraction that seem to make so much sense that you discard other, potentially more useful abstractions.

I have more broken Python code than I have broken Rust code, and one of the reasons is, that a lot of the stuff I did in Python (rightfully so) wouldn’t even compile in Rust.

Re:The faster you unlearn OOP, the better for you and your s... by naasking on Sunday November 25, 2018 @02:37PM (#18528539)
Not a compete one. Full Python semantics is not soundly typeable. Which type checker are you referring to?