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

Re: Newbie question: Dylan and OOP?



"Doug Ball" <doug@postsmart.net> wrote in message
003101c08732$7bfd8260$8a00000a@darwin.net">news:003101c08732$7bfd8260$8a00000a@darwin.net...
> I am a Dylan new comer and have not yet written any large applications
> in Dylan.  Do those of you who use OOP in other languages find Dylan's
> encapsulation of data and methods separately is helpful or that it
> degrades OOP?

> For me it seems a lot harder to do OOP but I am new to Dylan.  I would
> be very curious to hear your perspective, maybe I am looking at it
> wrong =)

I came to Dylan from about 6 years of real OOP using C++.  (I've done C++
for 8 years, but didn't know squat in my first two or so.)  I find Dylan's
object model, once you get around some conceptual hurdles, to be more
natural-seeming.

In Dylan objects encapsulate state only: not access control and not control
flow dispatch.  Modules and libraries together encapsulate access control.
Generic methods encapsulate control flow dispatch.

Initially this seems bizarre because we've been propagandized into thinking
that objects are for state, access control and control flow dispatch.
Separating these constructs seems alien at first.  As you get used to it,
however, you can start finding reasons why conflating all three of these
into one construct is very UNnatural.

--
Michael T. Richter
"Be seeing you."





References: