News for hackers. Stuff that matters.
Re:Brad Cox: when OOP was about “Software-ICs” and micro-tra... by MaxBarraclough on Friday December 20, 2019 @05:22PM (#21847898)
> many programmers now don't consider languages to be OOP unless they have the class keyword and inheritance.

If a language doesn't support inheritance, in what sense is it an object-oriented programming language?

It's true that you can use OOP principles in languages that don't have language-level support for OOP. The canonical example of this is the GObject library for C. That doesn't tell us how we should use the term object-oriented programming language though. I don't see why we'd use a more expansive definition.

Re:Brad Cox: when OOP was about “Software-ICs” and micro-tra... by pmontra on Saturday December 21, 2019 @12:18AM (#21849769)
Sending a message to an Erlang / Elixir process to change its internal status (a GenServer) is not conceptually different than calling a method of an object.

The big difference I see between Elixir and (example) Java or Ruby is that everything is an object in those languages but a big Elixir application has only a few GenServers, where keeping a state matters. Everything else is passed as argument, which by the way it's what a GenServer does internally with an endless tail recursion.

Re:Brad Cox: when OOP was about “Software-ICs” and micro-tra... by int_19h on Friday December 20, 2019 @10:16PM (#21849366)
In every sense. Prototype-based OO has been a thing for a long time now.

If you look at the entire breadth of OO languages and see what they have in common, there's really only two things that are truly common: object identity, and some form of dynamic dispatch based on that. Everything else - inheritance, encapsulation etc - is optional.

Re:Brad Cox: when OOP was about “Software-ICs” and micro-tra... by MaxBarraclough on Saturday December 21, 2019 @06:28PM (#21853954)
Prototype-based OO is a form of inheritance.

> there's really only two things that are truly common: object identity, and some form of dynamic dispatch based on that. Everything else - inheritance, encapsulation etc - is optional.

That's a broader definition than I had in mind, but I can see where you're coming from.

Re:Brad Cox: when OOP was about “Software-ICs” and micro-tra... by hhas01 on Friday December 20, 2019 @07:29PM (#21848662)
Self doesn’t have classes or inheritance, and it’s as [single-dispatch] OO as they come.

(Certainly moreso than something like C++, which wouldn’t look out of place on a Melanesian island. Never could figure why C++ and all its typed kin would choose to dispatch [dynamically] on only one argument instead of on all. Playing to their weaknesses, no?)

Re:Brad Cox: when OOP was about “Software-ICs” and micro-tra... by MaxBarraclough on Saturday December 21, 2019 @06:31PM (#21853966)
My guess is that by going with single dispatch, you get clear 'ownership' in terms of methods^H^H^H^H^H^H^H member-functions belonging to classes.

Can't say I know a lot about multiple-dispatch though.

Re:Brad Cox: when OOP was about “Software-ICs” and micro-tra... by magicalhippo on Friday December 20, 2019 @07:12PM (#21848571)
Thinking off the top of my head, how about a language that only had interfaces (ala COM)? Implemented by non-inheritable objects, using delegation instead of inheritance to share code.

I imagine some syntax sugar to help with the delegation to make it less cumbersome.