News for hackers. Stuff that matters.
Re:Closures and Objects Are Equivalent by tel on Sunday April 12, 2015 @05:36PM (#9364825)
That doesn't seem to have anything to do with objects versus closures. In both cases the right answers is absolutely to pass a function to DoSomething be it a function or a method.

If you're considering a language deficient of functions then we can take advantage exactly of the idea that objects can embed functions by having a "callable" thing.

    foo#doSomething (object
      method call : unit -> unit =
        ...
    end)
Re:Closures and Objects Are Equivalent by zzzcpan on Sunday April 12, 2015 @06:16PM (#9364938)
Ok, you are right. I was confusing implementation with the concept.