[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
suggestion for language extension
- To: cl@DOUGHNUT.CS.ROCHESTER.EDU
- Subject: suggestion for language extension
- From: Brad Miller <miller@ACORN.CS.ROCHESTER.EDU>
- Date: Mon, 26 Oct 87 17:37 EST
- Organization: University of Rochester, Department of Computer Science
- Phone: 716-275-1118
- Postal-address: 401A CS Building, Computer Science Department, University of Rochester, Rochester NY 14627
- Reply-to: email@example.com
- Sender: firstname.lastname@example.org
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,
University of Rochester Computer Science Department