4 ms·
Regarding packages, sometimes I wonder whether package names could have been symbols: that would allow for gensymed packages, as well as hierarchical packages.
by junke 10y ago
Regarding packages, sometimes I wonder whether package names could have been symbols: that would allow for gensymed packages, as well as hierarchical packages.
- kazinator 10y agoI implemented a package system influenced by CL's. I thought of the idea of package names themselves being symbols (themselves interned in some root package that has no name, or perhaps has one of those symbols as its name). I couldn't come up with a good set of requirements that would make things better, so I didn't bother with it. It just seemed like self-refererence for the sake of self-reference, like some new appendix to D. Hofstadter's GEB. :)
- aidenn0 10y agoI prototyped a reader-macro for CL that does this, specifically because it gives you package-local nicknames: https://github.com/jasom/spm-reader https://github.com/jasom/spm-reader
- kazinator 10y agoI once made a kind of "package Swiss Army Knife" reader macro for Common Lisp which lets you do cool things. It's reasonably well documented in a header comment. It might be up your alley, since you're working on a package-related reader macro: http://www.kylheku.com/cgit/lisp-snippets/tree/pkg.lisp http://www.kylheku.com/cgit/lisp-snippets/tree/pkg.lisp