Page 1 of 1
what is difference between : and :#
Posted: Sun Dec 16, 2012 6:24 am
by mcheema
I was curious about the difference if any between something like
and
which is preferred?
Re: what is difference between : and :#
Posted: Sun Dec 16, 2012 11:32 am
by nuntius
:word creates a symbol in the keyword package; it will remain during the life of your program.
#:word creates a symbol in no package; it will presumably be garbage collected after use.
In both cases, symbol-name is used to create a new symbol (by name). The benefit of using these instead of "word" is that they undergo the default case translation whereas a string literal does not.
Thus there is a minor memory benefit to using #:word.
Re: what is difference between : and :#
Posted: Sun Dec 16, 2012 4:58 pm
by mcheema
nice explanations thx