From: Tomas Zellerin <zellerin@gm...> - 2006-10-16 08:43:34
consider following (rather artificial) snippet:
(defmacro add-crlf (string)
(write-string string o)
(princ #\Return o)
(princ #\LineFeed o)
(print (length (add-crlf "a")))
It prints 3 when loaded without or with compiling, but 2 when
compile-file is used and .fas loaded.
I think it is due to treatment described in impnotes 13.8., Treatment
of Newline during Input and Output.
I am no language lawyer, but I believe this contradicts requirements
of CLHS about similarity of compile-file/loaded literals:
"The file compiler must cooperate with the loader in order to assure
that in each case where an externalizable object is processed as a
literal object, the loader will construct a similar object."
Is this a bug, or in some twisted sense "desired behaviour"?