2 ms·
I don't think Ruby is message passing either because the caller determines which method to call, based on the object's method table. #method_missing is just ano
by chrisseaton 8y ago
I don't think Ruby is message passing either because the caller determines which method to call, based on the object's method table. #method_missing is just another method to be called by the caller - it isn't an example of the object being able to determine what happens. I think #send is really #call, but I think the name implies someone somewhere thought it was message passing.
If I'm being uncharitable I think applying the term 'message passing' to Ruby is a bit of making something sound more sophisticated and elaborate than it is. They're method calls - it's pretty simple already and doesn't need a complex concept on top of that.
- inopinatus 8y agoIt merely remains to fork and/or invent a language that otherwise looks almost exactly like Ruby but with message passing only.
- macintux 8y agoElixir?
- chrisseaton 8y agoElixir has conventional method calls by default, and only optional message passing with a separate syntax. It's definitely not message passing everywhere.
- macintux 8y agoIt’s message passing everywhere outside the current object (process). It’s a little tough to compare to an OO language because there are no classes, but all object to object communications are asynchronous messages.