[Openmcl-devel] Package-local nicknames
ron at flownet.com
Wed Feb 6 15:06:03 CST 2013
Just FYI, a few years back I engaged in a similar discussion with the CL community over the idea of a "combination-hook" that would allow users to assign useful semantics to:
In particular, the ability to have ((...) ...) be a synonym for (funcall (...) ...) is useful for pedagogy because it allows you to implement the lambda calculus much more cleanly (for some reasonable value of "clean").
There was a tremendous amount of resistance to a global *combination-hook* variable, but less resistance to the idea of a global COMBINATION-HOOK macro, because that would allow code that cared about how ((...) ...) was expanded to locally bind COMBINATION-HOOK with MACROLET.
I don't know if there's an analogous solution to this problem that would make everyone happy. Since packages are handled by the reader it's much harder to modularize extensions to their functionality, since there is no such thing as READTABLE-LET. (Hm, there's an idea...) But maybe just putting this out there will result in someone coming up with something clever.
Of course, one could always do the Right Thing and drop packages entirely in favor of lexicons ;-) ;-) ;-)
On Feb 6, 2013, at 12:39 PM, Tim Bradshaw wrote:
> On 6 Feb 2013, at 19:01, Hans Hübner wrote:
>> I think that some cross-platform mechanism for local nicknames is needed, but I'm not sure whether the hook based package name resolution proposal is really better than an extended defpackage now. It would make sense to have something that implementors would actually (be able to) adopt.
> Once again I'll say it: the advantage of a hook (or some similar substrate mechanism) is that it allows *things other than this specific thing* to be implemented. I regard that as an advantage: perhaps I am alone in that, and everyone else already knows exactly what extra things we would like to be able to happen with package lookup and the complete design is all sorted and done, but I kind of doubt that.
> Is there something preventing CCL adopting a hook? Of the implementations I have looked at (not all in recent history)
> - CMUCL can be hooked
> - SBCL have not looked but probably can
> - LW can be hooked
> - Allegro can be hooked
> - GCL do not know
> - CLISP do not know
> - CCL do not know
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Openmcl-devel