Re: Closures versus objects
Steve Dekorte <[email protected]>
| Newsgroups | gmane.comp.lang.lightweight |
|---|---|
| Message-ID | <[email protected]> |
On 15 Feb 2007, at 11:13 am, Mike Newhall wrote: > Closures clearly can be used to make object-like things, and > objects can be used to make closure-like things. Is one > demonstrably "better" than the other, in a theoretic or practical > sense, or both? The big difference for me is purity - a pure object system has consistent semantics while a system based on first-class functions ends up having both functions and object-like-things built with functions. And that non-pure dynamic object code has type dependencies, which are at odds with code reuse and flexibility. - Steve