[Prev][Next][Index][Thread]

Re: Q: member syntax in dylan?



"Roland Paterson-Jones" <rolandpj@bigfoot.com> writes:

> The motivation is, of course, that it's fun to associate methods with their
> class, particularly when their are no multi-dispatch issues. I believe that
> this encourages object-oriented programming (having come, of course, from
> java and c++).

No, that's just what Java and C++ have taught you, where classes
double as units of encapsulation and units of abstraction. Witness
"friend" classes in C++ to see where this leads to problems.

In Dylan, you group classes and functions that belong together into a
module. This encourages encapsulation, and leaves your choice of class
design alone.

Andreas

-- 
"Der Pirat des Wissens ist ein guter Pirat."

  -- Michel Serres, 
     http://www.heise.de/tp/deutsch/inhalt/co/3602/1.html



References: