This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
I'm finding MAKE-SYMBOL a bit mysterious, I "blindly" followed the spec and chose this as a definition, all the tests I could find passed:
(defun make-symbol (x) (invoke-static gnu.mapping.Symbol 'makeUninterned x))
But I'm struggling to see what the motivation for MAKE-SYMBOL is, when do you use such a function?
This http://cl-cookbook.sourceforge.net/macros.html has an example using it. I'm not sure whether the uninterned-ness of MAKE-SYMBOL-made symbols is crucial to that macro working correctly (maybe!), but its ability to construct a symbol at runtime with a specified name is.
So, it's kind of like Scheme's string->symbol, which is handy in macro definitions (for an example, see gnu/kawa/slib/enums.scm).
-- Jamison Hope The PTR Group www.theptrgroup.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |