This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

Watch out with backquote and quote!

1 post · 1746 views

Just like quote, if you alter the resulting list, it will alter your code there!

I today and a week ago had a big wtf when destructive functions altered my code. I knew quoted code could do that, but didn't realize backquoted code does it too. The second i was using LML2. To be more precise it was something like:
(eval `(html-file-page (,filename) ,@auch-i-got-altered))
Rather unexpected to see that alter it. The documentation of neither EVAL or the linked MACROEXPAND-1 say anything about being destructive, so it is probably LML2. Really bad form to use EVAL though. I don't really like LML2 earlier either, doesn't have very good documentation, but it did work out of the box.