[pro] User defined format functions

Daniel Weinreb dlw at itasoftware.com
Tue Jan 25 17:36:38 UTC 2011



Didier Verna wrote:
> I'm aware of the ~// construct, which I find extremely cumbersome. Does
> anybody actually use it? 
Yes, we use it heavily, mainly for date/time processing,
which can be very complicated when you're dealing
with time zones and such.  Example:

                    (list :departure-time (format nil "~/zul%ISO8601/" 
departure-time-zul)
                          :arrival-time (format nil "~/zul%ISO8601/" 
arrival-time-zul)
                          :airimp-departure-time
                          (format nil "~/loc%HHMM/"
                                  (local-tofd-only (local-time 
departure-time-zul)))
                          :airimp-arrival-time


> It seems to me that the package handling part,
> specifically, makes it totally unusable. 
You mean the fact that the name must be in the cl-user
package, so that if there are two modules trying to
use the same name, they conflict.  That's true, but
I think "totally unusable" is going a bit far.

I actually can't remember why package prefixes
aren't allowed.  It was a long time ago.

-- Dan





More information about the pro mailing list