3 ms·
Because sometimes it's better for readability and conceptual simplicity to structure the code as objects connected to each other. Most of large-scale successful
by RivieraKid 8y ago
Because sometimes it's better for readability and conceptual simplicity to structure the code as objects connected to each other. Most of large-scale successful projects, often written by better developers than me or you, use OOP.
- dnautics 8y agoAnd 80% of the internet switches (Cisco and juniper) are controlled by erlang. So? I think you're looking at this wrong. Part of the reason why so many large scale products use OO, is because they use Java, and java is awesome if you're working at such a large organization that your productivity is most easily measured by pointy haired managers who count how many LOC you've written ;) As for readability and conceptual simplicity, may I introduce you to something called the Factory pattern?
- RivieraKid 8y agoI don't think that's a big part of the reason to be honest. Also, modern Java has a reasonable support for FP. I'm talking about projects like Mapbox, Blender, Firefox, Android.
- dhimes 8y agoI might be wrong, but my understanding is things happened backwards from that. OOP tried to solve the problem of how to get tons of devs working on huge projects at the same time; java came along to try to be an awesome OOP environment, so Java became the standard.
- dnautics 8y agoWhat is or is not OOP is actually fuzzy. When it boils down to it erlang's actor model is basically an implementation of smalltalk objects (but don't tell joe Armstrong that). Elixir's module/struct/protocol looks awfully like OO in the post bjarne soustrop era. Conversely, python's objects feel anti-object since you're passing self all the time (aka dot notation is a weaksauce syntactic sugar)... You could easily model this behavior if you really wanted in Julia, for example, with a custom operator (not that you should) function Base.^(o <: Object, fn) (a...) -> fn(o, a...) end
- lliamander 8y agoJoe already knows. He and Alan Kay had a talk about it. It was great.
- dnautics 8y ago> OOP tried to solve the problem of how to get tons of devs working on huge projects at the same time I am skeptical of that history. Simula and smalltalk were academic endeavors long before lots of devs were working on projects, Java became popular because it was a portable C++ which had no pointers and garbage collection.
- pjmlp 8y agoSmalltalk was being adopted across the industry when Java came around, the big difference was that JDK was free beer and one of the big Smalltakers (IBM) rebooted their environment into Eclipse, while jumping into Java bandwagon.
- vram22 8y agoWas it Visual Age for SmallTalk which became Visual Age for Java which later became Eclipse? Vaguely remember reading something like that earlier.
- testrun 8y agoThat is seriously rewriting history. Smalltalk was not big in any shape or form in business in the mid '90s.
- pjmlp 8y agoLike Java ended up being afterwards no. It surely had lots of consulting opportunities, though.
- andrewflnr 8y agoErlang is arguably the most object-oriented language in common usage. Actor concurrency is closer to the original OO model than everyone else's "struct with methods". I'm more inclined to agree with you overall, but Erlang might not be your best example. :) Edit: never mind, you're obviously aware...
- lenkite 8y agoErlang is more purely object-oriented than Java. These are the words from its creator itself http://www.infoq.com/interviews/johnson-armstrong-oop http://www.infoq.com/interviews/johnson-armstrong-oop
- munro 8y ago> Most of large-scale successful projects, often written by better developers than me or you, use OOP. Ad hominem if I ever saw one.