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

suggestion for language extension



I'd like to make a proposal, though this is not concrete enough to be handed
to the technical committee, I'm hoping it will generate some discussion.

I don't know if any of you saw my short flame in comp.lang.lisp; in summary I
am disapointed in the lack of (certain kinds of) extensibility in CL.

There is, in fact, something conceptually simple that could be added to the
spec, is upward compatible with the current language, and would make me sleep
a lot easier (though compiler writers may groan a bit):

    Allow overloading of functions.

This would allow me to create my own first-class objects, since I could
overload common operators to handle (special case) the new type.

What (I think) this means to the CL implementor...

If you are a lispm manufacturer, I can imagine something like 'advise' would
pretty much do the trick, though one might like to be able to (at some point
compile in the advice on a function, make the compiler know about the new type
etc. Even create a special tag for the object and patch the microcode. But
that's probably going overboard (though it is something a lispm may be able to
do a lot easier than a SUN). For most, a function similar to the lispm advise
would be needed, since one may want to overload potentally any function.

Again, there would be no particular requirement for *efficiency*, though it
would be nice, of course, the idea would be to allow the user to create a
first-class object, be it a lazy-stream, a continuation, or whatever.

    Thanks for listening,
    Brad Miller
------
miller@cs.rochester.edu {...allegra!rochester!miller}
Brad Miller
University of Rochester Computer Science Department