Re:Why Lisp macros are cool, a Perl perspective (2005)
by masklinn on Monday August 31, 2009 @04:56AM
(#795623)
> What does the comma right before place in its second usage signify?
It "punches a hole" in the quote: the ` in `(setf ,place (* v v)) says "don't evaluate this, this is a litteral value/list", but then the comma indicates "actually evaluate just this expression right here within the definition context" so ,place will be replaced by the value of the place argument. It's kinda equivalent to #{} in Ruby strings.
As others have pointed out, v should probably be unquoted as well.
It "punches a hole" in the quote: the ` in `(setf ,place (* v v)) says "don't evaluate this, this is a litteral value/list", but then the comma indicates "actually evaluate just this expression right here within the definition context" so ,place will be replaced by the value of the place argument. It's kinda equivalent to #{} in Ruby strings.
As others have pointed out, v should probably be unquoted as well.