[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Functional objects
- From: Mark Hamburg <mhamburg@...>
- Date: Wed, 22 Sep 2004 12:33:39 -0700
Exactly. The idea is to shield clients as much as possible from knowing how
the object is implemented.
on 9/22/04 12:13 PM, Rici Lake at firstname.lastname@example.org wrote:
> Well, that was my first reaction, too. But when I started to think
> about it, particularly when playing around with implementing objects as
> coroutines, I realised that it is nice to be able to do:
> obj:method(arg1, arg2)
> without having to know whether obj is a traditional table-based object,
> or a function-based object. (In other words, the implementation of obj
> could change without having to change consumers of the object.) Of
> course, you could write a wrapper for obj to make it work properly, but
> Mark's idea seems like a nice way of getting around having to do that.