3 ms·
> the old adage about closure's being a poor man's object and vice versa isn't true if the closure doesn't close around the variables themselves Sure it is. Ol
by evincarofautumn 13y ago
> the old adage about closure's being a poor man's object and vice versa isn't true if the closure doesn't close around the variables themselves
Sure it is. Oleg Kiselyov wrote a purely functional OO system in Scheme[1], which uses closures for member variables and seems to do just fine without mutation. Of course, it does rely a bit on dynamic typing.
[1] http://okmij.org/ftp/Scheme/#pure-oo http://okmij.org/ftp/Scheme/#pure-oo