[pro] User defined format functions

Pascal J. Bourguignon pjb at informatimago.com
Tue Jan 25 18:00:35 UTC 2011


Didier Verna <didier at lrde.epita.fr> writes:

> (format stream "... ~\e\ ..." #|...|# str #|...|#)

\ is already meaningful in strings, to escape \ or ".
So you'd have to use ~\\e\\.


> Of course, there are package issues. Maybe we would need a centralized
> mapping between function names (what goes in ~\\) and actual symbols
> denoting the actual function? Possibly with the possibility to override
> the mapping by providing a package prefix in the ~\\ construct?

I don't like it.


> WDYT? Does something like that already exists[2]?

The standard already allows control-strings to be functions.
So you could write a cl:formatter-like macro with any extension you
like.

There's no need for any extension, just use CL.


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.




More information about the pro mailing list