Pistrie

Pistrie

Would you say that Elixir implements some or all of Alan Kay's definition of object-oriented design?

For some reason I started thinking about Alan Kay’s definition of OOP, and I remembered that he emphasized the importance of messaging. Since Elixir has processes which communicate via messages I thought it would be fair to say that Elixir is at least partly comforming to the purest definition of object-oriented design.

Thoughts? Discuss.

Most Liked

soup

soup

Some rando called “Joe Armstrong” has said the same thing:

Joe Armstrong: Erlang has got all these things. It’s got isolation, it’s got polymorphism and it’s got pure messaging. From that point of view, we might say it’s the only object oriented language

Ralph Johnson: The thing about Erlang is that it’s in some sense 2 languages, at least you program it 2 levels because one is the functional language that you use to write a single process and then there is what you think about all these processes and how do they interact, one process is sending messages to the other. At a higher level, that Erlang is object oriented, at the lowest level it’s a pure functional language and that’s how it got advertised for a long time.

Ralph Johnson, Joe Armstrong on the State of OOP - InfoQ ~7m30s

(Elixir was not out at this time.)

19
Post #2
rvirding

rvirding

Creator of Erlang

I don’t really know how comment on this. Just some points (hopefully not too confusing):

  • Concurrency and fault tolernace were fundamental properties of the systems in which we were interested. Without these any solution was not interesting, however cool it might be.

  • For us concurrency and parallelism are different things, related but not the same. Concurrency is all about the problem and how you structure your system to solve it, while parallelism is a property of the hardware on which you are running.

  • Our goal was to create language, and ways to use it, which supported us in building these types of systems.

  • This is why we called them processes as that was how we were thinking.

  • The functional nature actually came later. It started out as Prolog and then migrated to a functional language as it better fitted what we felt we needed.

  • We were never OO at least clasical OO! At all! There is an OO chapter in the original book but that was more written as a joke. Shh that is a secret. :smiley:

  • We got the feeling that OO languages, at least in those days, were very sequential and not concurrent. While they might talk of “sending messages” it was really just doing a function call. Which was what we didn’t want.

  • Doing the right error handling worked much better with processes.

I could go on here but think operating systems!

EDIT: We also felt that OO was very mutable, shared and global concerning data. Everything we didn’t want!

dmitriid

dmitriid

Also, I clean forgot that Alan Kay answered this question on Quora:

I love Joe Armstrong — we lost a great man when he recently left us.

And, he might be right. Erlang is much closer to the original ideas I had about “objects” and how to use them.

However, another way to look at this is to consider “What Is Actually Needed” (WIAN) and realize that much more is needed beyond what we are programming in today.

Joe would most definitely be more in favor of this idea than worrying about what either one of us did decades ago.

Where Next?

Popular in Discussions Top

hazardfn
I suppose this question is effectively hackney vs. ibrowse but we are at a point in our project where we have to make a choice between th...
New
kostonstyle
Hi all How can I compare haskell with elixir, included tools, webservices, ect. Thanks
New
blackode
Elixir Upgrading is so Simple in Ubuntu and It worked for me Ubuntu 16.04 git clone https://github.com/elixir-lang/elixir.git cd elixir...
New
Qqwy
I would like to spark a discussion about the static access operator: .. For whom does not know: it is used in Elixir to access fields of...
New
Crowdhailer
I’ve been hearing much about the new formatter and it’s something I have been keen to try. I find examples buy far the most illuminating...
248 19327 150
New
andre1sk
A big advantage to Elixir is all the distributed goodness but for many applications running on multiple nodes having integrated Etcd, Zoo...
New
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
lucaong
Hello Elixir and Nerves community, I have been working for a while on an open-source embedded key-value database for Elixir, that I call...
230 14027 124
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

Other popular topics Top

minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39467 209
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New

Latest on Elixir Forum

We're in Beta

About us Mission Statement