On Sunday, 25. October 2009 01:38:21 Martin D Kealey wrote:
> Sounds like going back to static typing -- which does sometimes have some
> advantages.

Well, you can also consider it dynamic. The important point is
that it is a constraint on allowed types e.g. in the sig of a sub
or on a variable. In my proposal they are handled through conversion
on class level.

> One way to implement at would be to use proxy objects, which only do
> one of the roles (by passing them through to the appropriate methods on the
> original object).

Do I understand you right that you propose to have a Dogwood class
and two auxiliary proxy classes for the Dog and Wood roles? Isn't that
too much effort? OTOH, a conversion routine could indeed return such
a proxy if the original shall be kept unchanged.

Regards, TSa.
"The unavoidable price of reliability is simplicity" -- C.A.R. Hoare
"Simplicity does not precede complexity, but follows it." -- A.J. Perlis
1 + 2 + 3 + 4 + ... = -1/12  -- Srinivasa Ramanujan

Reply via email to