[erlang-questions] programming tip: a note on encapsulation
Wed Nov 18 23:08:58 CET 2009
On Nov 18, 2009, at 9:56 PM, Joe Armstrong wrote:
> Here's a little programming technique I discovered yesterday, which I
> rather like.
It looks a whole lot like the way people used to do "objects" in T.
(define (make-my-object ....)
(method (lambda (....) ....))
with the equivalent of
foo = new MyObject(...);
(let ((Foo (make-my-object ....)))
((Foo 'method) X Y)
It looks as though "Joe hates OO" may have to be rewritten!
More information about the erlang-questions