3 ms·
> I learnt that (from Alan Kay), OOP is about message passing I just like to point out that Alan Kay has a very particular idea of OOP that doesn't match the c
by spacechild1 5y ago
> I learnt that (from Alan Kay), OOP is about message passing
I just like to point out that Alan Kay has a very particular idea of OOP that doesn't match the current mainstream usage. None of the modern OOP languages are “object oriented“ in Alan Kay's meaning of the term.
- Rendello 5y agoOne sort-of exception is Erlang (and anything else that runs on the BEAM vm, like Elixir). It doesn't match Alan Kay's vision exactly, because the message passing is done a bit differently (for example it's asynchronous), but creator Joe Armstrong called it something like "the best of functional programming and OOP". If you come from C++, Java, or other "OOP" languages, and look at Erlang, it's completely different than what you expect. In Erlang, the "objects" are less like mutable structs and more like functional mini-programs that can create new programs, pass messages, and fail as you would expect. To get some perspective on both of their perspectives, here's "Joe Armstrong interviews Alan Kay": https://www.youtube.com/watch?v=fhOHn9TClXY https://www.youtube.com/watch?v=fhOHn9TClXY
- Lammy 5y ago> for example it’s asynchronous Ruby also lets you build programs like this as of 3.0, using Ractor#send / Ractor::receive https://docs.ruby-lang.org/en/master/doc/ractor_md.html#label-Communication+between+Ractors https://docs.ruby-lang.org/en/master/doc/ractor_md.html#labe... It’s still pretty new so a lot of the Gem ecosystem hasn’t caught up yet (e.g. C extensions need to be explicitly opted-in as Ractor-safe), but I built a new “MIME::Types” library replacement with it recently and have enjoyed very few teething issues: https://github.com/okeeblow/DistorteD/blob/NEW%E2%80%85SENSATION/CHECKING%20YOU%20OUT/lib/checking-you-out/ghost_revival.rb#L363 https://github.com/okeeblow/DistorteD/blob/NEW%E2%80%85SENSA...
- dllthomas 5y ago> Joe Armstrong called it something like "the best of functional programming and OOP". Though IIUC Armstrong only started doing that after others pointed out that it was OOP.
- Zababa 5y agoI think Alan Kay's OOP is widely used, but not at the "program" level. From what I understand, according to Alan Kay, OOP is about message passing, late binding and internal state. This is the way lots of software works these days with JSON over HTTP, or protocol buffers, or something else. I think at some point people imagined that there would be a point where you could buy or use objects from other people to build your programs more efficiently. I think that's what happened, with some companies offering very specific objects (auth for example, or persistance), while other offer a library with everything you need (cloud providers). And we even "rediscovered" the concept of interface in a way with stuff like "compatible with the S3 API".