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

Re: Results: finished teaching one Dylan course



And Rob Myers writes:
 - If explained well to a beginner it would make more sense than C++/Java's 
 - "actions inside objects".

The main problem I run into when trying to explain these things is
impatience.  ``So, what's an object?''  ``About a zillion different
things in different aspects...  Let me start with...''  ``Never mind.
The Java answer is easy.''

But then I tend to wax rhapsodic about typing rules, feature 
orthogonality, and other semi-academic concerns.  That's probably 
my main failing.  ;)  And I tend not to be talking with true
beginners.

 - The existence of "friend" in C++ shows how broken single dispatch and
 - methods-inside-objects is.

Here's something else that will make you laugh and cry:
  How Non-Member Functions Improve Encapsulation
  Scott Meyers
  http://www.cuj.com/archive/1802/feature.html

A quote:
  It's time to abandon the traditional, but inaccurate, ideas of what 
  it means to be object-oriented.

And he's spent a long time on comp.lang.c++ trying to implement
various hacks around C++'s lack of generic functions.  Amazing.
I'm almost of the opinion that there's a secret CLOS cabal 
somewhere slowly arranging for the world to re-arrive at it...

 - If the president is talking to the janitor, the code will be different from
 - the janitor talking to the president. And then if you get two janitors or
 - two presidents speaking to each other, it will be different again. Although
 - one of the Janitors may be Hong Kong Phooey. :-)

I _like_ this.  ;)

Dylan at least provides the stepping stone of invoking single-dispatch
functions like other languages.  hmm...  Maybe an example that starts
with something simple, discovers the need for multiple dispatch, and
then shows how the generic function syntax and semantics are the Right
Thing.  Added to my long, long to-do list.

Jason



References: