Earlier quoted context omitted.
> I think OOP is fine as long as you are doing it and as long as it is single-threaded. I don't really see how threading has anything to do with it. What OOP allows you to do is choose what terms you want to express your solution in. You can choose language that exposes thread-safe aspects of your problem domain without requiring the user to be aware that they are expressing things in thread-safe terms. In my last pr…
OOP has no built-in facilities to deal with multi-threading. It's orthogonal to it and that's a problem. Thread safety can't be expressed or enforced and you can't grab a bunch of classes from somewhere and assume anything about their fitness for multi-threaded code. Typically one has to carefully design a class for multi-threaded use. Reasoning about state inside objects then quickly becomes infeasible.
OOP Is Dead, Long Live OOP
171–180 of 357 posts
Re: OOP Is Dead, Long Live OOP
#172Earlier quoted context omitted.
Someone with 15 years programming OOP told me once: here is the best way to describe object oriented programming: you asked for object “monkey”, and you got the whole jungle, as well as monkey’s bananas.
I don't really follow this. A fleshed-out example describing the trade-offs is almost mandatory for this kind of criticism since this could be very easily due to a misunderstanding or misapplication of OOP rather than a problem with it.
Re: OOP Is Dead, Long Live OOP
#173Earlier quoted context omitted.
It's Unity's (the game engine) new Entity-Component-System, the blog post is an answer to this presentation: http://aras-p.info/texts/files/2018Academy%20-%20ECS-DoD.pdf Unity's traditional entity system is suffering from a number of "OOP-isms" which make it hard/impossible to optimize for performance. The new ECS strictly follows a Data-Oriented-Design approach, where everything is built around laying out the data i…
I don't think Entity-Component-System is Unity-specific. From what I recall from other articles, Unity has its own idiosyncratic implementation, but the pattern has several slightly different interpretations.
Re: OOP Is Dead, Long Live OOP
#174Earlier quoted context omitted.
Yes. That may very well be. And I'm not saying Java is bad because of what I described. Just that I experience the, "ugh OOP isn't helping me do what I want to do here" with Java.
It probably is the right tool if you have an enterprise problem that needs an enterprise solution.
Re: OOP Is Dead, Long Live OOP
#175Earlier quoted context omitted.
Can you please point out exactly what I said when you say 'the behavior I'm criticizing OOP for'. Haskell typeclasses are very different from OOP inheritance or OOP classes. In any case, I don't see how that relates to the explicit criticisms I made.
> All in all, OOP is a toolkit for building bad abstractions: abstractions that do not easily model computation, that hide data. That's a fundamental property of type erasure, which is not exclusive to OOP, and far from the extent of what modern OOP is about
Re: OOP Is Dead, Long Live OOP
#176Re: OOP Is Dead, Long Live OOP
#177Closure: or, simply use this monstrous component pattern when 70% of your code is boilerplate or hack into namespaces and override functions in them in runtime. And don’t forget to do it in right order!
JavaScript: yeah, simply re-define ‘require’ before importing dependencies in tests. Yeah, do it in right order.
Recent example - I was researching how to mock calls to functions in packages in go... Well, the best thing you can do is to have package private variable, assign function to it and use it throughout the code so you can swap it with mock/stub in a test.
There is none of that bs when I write Java or C#. I have a mechanism to decouple contracts from implementations - interfaces. I have mechanism to supply dependencies to modules - it’s called constructor parameters. I can replace implementations easily with mocks or stubs in tests without target even noticing that.
Can somebody provide me with an example of this kind of decoupling achieved in other paradigms _without_ hacking the runtime of a language or ugly tricks like in go case?
Re: OOP Is Dead, Long Live OOP
#178Becoming a professional Haskell and Erlang developer really shifted my view on OOP (let OOP denote class based OOP as found in Java or C++). In my view, OOP is prove a poor model for computation, and the result has been that OO code is almost always significantly more complex and error prone than an equivalent computation written in a concurrent, functional, or structured paradigm. Recent trends in language design (s…
If you have a project where a single person could reasonably understand all the components then maybe OOP is overkill.
I also recognize others may have had an equal and opposite experience.
Re: OOP Is Dead, Long Live OOP
#179Some other takes: Casey Muratori (Handmade Hero) on why OOP is bad and how to get rid of that mindset - https://youtu.be/GKYCA3UsmrU?t=4m50s Mike Acton (Engine Director @ Insomniac Games) - https://www.youtube.com/watch?v=rX0ItVEVjHc
Re: OOP Is Dead, Long Live OOP
#180Some other takes: Casey Muratori (Handmade Hero) on why OOP is bad and how to get rid of that mindset - https://youtu.be/GKYCA3UsmrU?t=4m50s Mike Acton (Engine Director @ Insomniac Games) - https://www.youtube.com/watch?v=rX0ItVEVjHc