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.
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.
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.
> 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.
(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?)
Can't say I know a lot about multiple-dispatch though.
I imagine some syntax sugar to help with the delegation to make it less cumbersome.
Just take what you believe is the better definition of OOP and rebrand it.
The very name of this site is a powerful argument to the contrary. Slashdotters initially dissed it, saying the word "hacker" (as in coder or builder as opposed to criminal) should be retired. Now the older sense of the word is widespread enough that people halfway around the world are aware of hackers in the sense that PG named this forum. Indie Hackers is only further cementing the reversal of the trend that once appeared inevitable.
Terms that flow and change too freely makes communication very difficult and often leads to people having pointless arguments due to fundamentally misunderstanding what each person is saying. And I do disagree that it's Sisyphean. Raising awareness can and does influence how words are used (especially within a group).
Currently "OOP" roughly means [Alan Kay's vision] or [Java-like]. That is an imprecise and mostly useless definition but it's the one it has, whether we like it or not. A stable terminology is desirable and that's why we shouldn't redefine "OOP".
Think of it like an API. What's more backwards-compatible: changing the behavior of oop() or deprecating it in favor of javaLikeProgramming() and kayProgramming() ?
It's kind of like introducing yourself as a compsci minor and then explaining OOP vs FP. I'd just leave off the creds, there's no need.
It's not a "flex," it's an honest contextualization of an anecdote. They certainly studied more linguistics than I did. I, uh... had a minor... crush on a linguistics major I met through the teaching union, and we had a few casual conversations about their thesis? Now that's a weird flex.
The point of their comment was not to introduce the well-known concept; it was to relay their impression of the culture that they experienced. Please be more charitable with folks' contributions here.
And for me it was eight classes, ~1 a semester.
In the case of "hacker" it has a different meaning in the media and the general population, but this is not a problem because the audience of HN understands the intended meaning.
But if we were in a situation where it mattered what other people I thought the word meant, then we would be fucked. And that is evident by just talking with regular folk and asking them what they think about hackers.
The situation with OOP is different. It is our community itself that uses the word incorrectly (according to some people, including the original commenter).
In our little bubble, perhaps. But I'm pretty sure that to my family and non-techie friends, "hacker" has only the negative meaning. That's why, when I tell them in general terms about what I'm doing during a hackathon at work, I don't use that word.
* chuck everything vaguely related in a class
* share code by using inheritance
IMHO, the way Java and C++ have been taught (in practice, if not by teachers) has done a disservice to OOP. So much so that many programmers now don't consider languages to be OOP unless they have the class keyword and inheritance.