News for hackers. Stuff that matters.
Re:Alan Kay on the Meaning of “Object-Oriented Programming” ... by pdkl95 on Sunday March 17, 2019 @05:44PM (#19416842)
Ruby gets close (which is one of the reasons I use it a lot):

* Function calls are messages sent to objects, which can be sent to any object directly with Object#send and received as messages when an object[1] responds to #message_missing.

* Local state is stored in objects as @foo variables. Ruby is a multi-paradigm language, so it's not strict about enforcing the privacy of local state, but that's rarely a big deal. Ruby softly encourages using an OOP message-passing style with e.g. Module.attr_accessor defining simple accessor wrappers instead of reading local state directly.

* The extreme lateness and mutability of binding in Ruby is (in)famous for making ruby slow and hard to optimize.

[1] I don't mean "defined in the class"; changes can be specific to a particular object instance.

    obj = Object.new
    obj.define_singleton_method(:method_missing) do |method,*args|
        puts method.to_s.capitalize
    end
    obj.hello!   # prints "Hello!"

There are no comments on this comment yet.