Hello,
I often try to support Allegro's modern mode by doing things like
(format-symbol t "~A-~A" :foo :bar).
We just came across an issue on #quicklisp where a user had set his
*PRINT-CASE* to :DOWNCASE and that caused FORMAT-SYMBOL to intern
lower-case symbols, thus breaking the idiom I described.
Should fix my code to use SYMBOLICATE instead or should FORMAT-SYMBOL
use WITH-STANDARD-IO-SYNTAX?
Any opinions?
--
Luís Oliveira
http://r42.eu/~luis
I've found the following definitions incredibly useful in
(nest) allowing indentation to not get out of hand
(nest) getting the good feeling of that binding has other languages
(tsen) focusing on the thing at hand, not the intermediate definitions needed
(tsen) "piping" results into a series of functions or forms.
I don't like the name "tsen", though. "wrap" comes to mind.
Maybe you have better suggestions.
;;; Nesting binding forms (from a suggestion by marco baringer)
(defmacro with-nesting ((&key (from-end t)) &rest things)
(if from-end `(nest ,@things) `(tsen ,@things)))
(defmacro nest (&rest things)
(reduce #'(lambda (outer inner) (append outer (list inner)))
things :from-end t))
(defmacro tsen (&rest things)
(reduce #'(lambda (inner outer) (append outer (list inner)))
things :from-end nil))
In any case, I'd like these to become a standard part of alexandria.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
Gauss, when asked how soon he expected to reach certain mathematical
conclusions, replied that he had reached them long ago, all he was worrying
about was how to reach them! [Karl F. Gauss (1777-1855), German mathematician]