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

Re: Dylan & MOP



I'm sending this to comp.lang.dylan. I have no idea whether it will reach
the info-dylan list given the current flakiness of the gateway.

In article <comp.lang.dylan.382B1198.DE31682D@miqs.com>, sribe@miqs.com wrote:

> Do I need to defend the utility of a MOP in Dylan?

Yes. Dylan has the very useful property that it can always calculate type
relations. I'm not sure you can guarantee this with any useful kind of
MOP...

> I think you should be able to find classes and generic functions by
> name. 

Classes and generic functions are merely objects. What you are asking for
is a special case of getting the value of a binding by name.

This sort of 'eval' type thing is a bad idea for Dylan, in my opinion. It
would mean, for instance, that the compiler could not compile away the
names of bindings.

> You can create a generic function, add and remove methods, and apply the
> function. Such a function is by nature anonymous, there is no way to
> bind it to a module-level name and call it by that name, nor is there
> apparently any way to "fake up" that kind of behavior.

What's wrong with

  define constant myfunction = make(<generic>, required: 3);

...?

-- 
Ashley Yakeley, Seattle WA



Follow-Ups: References: