[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] getting to grips with multimethods
From: |
John Cowan |
Subject: |
Re: [Chicken-users] getting to grips with multimethods |
Date: |
Sat, 31 Jul 2010 23:48:00 -0400 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Martin DeMello scripsit:
> Coming from a traditional single-dispatch OOP background, one of the
> biggest problems I'm finding with coops's CLOS-style multimethods is
> that methods are no longer namespaced by their classes, but leak into
> the current namespace. Thus, when I import a module containing some
> classes, I have to be aware of all the methods and make sure I don't
> have anything clashing with them in the importing code. How do people
> generally deal with this?
By getting used to the idea that generic functions are first-class, and
that classes aren't namespaces. Modules are namespaces, and you have
to be careful with both the generic functions and the classes within them.
--
Ambassador Trentino: I've said enough. I'm a man of few words.
Rufus T. Firefly: I'm a man of one word: scram!
--Duck Soup John Cowan <address@hidden>