Oct292008
Objects vs Closures
Filed under: meta programming+paradigmsI've finally come to the understanding (somewhat belatedly) that there isn't a lot of difference between an object and a closure. Once again, I'm forced to admit that the Lisp/Scheme people were right all along.
I came across a message from Guy L. Steele regarding the distinction (or lack of) where he states:
A closure is an object that supports exactly one method: "apply".
But of course, this is actually true of objects as well. If the object itself is considered a closure, and each of the object's methods is also a closure, then what you are left with is nested closures, each with one method: "apply". The distinction seems more semantic (i.e. how you choose to view it) than fundamental.







Interesting that I had a similar reflection on the subject some time ago. This was very interesting to me; ofcourse I am not that academic to separate concepts well; yet take a look at this. It maybe interesting: http://hcoding.blogspot.com/2008/02/oop-and-foop.html