<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
Didier Verna wrote:
<blockquote cite="mid:m2lj28d9o8.fsf@lrde.epita.fr" type="cite">
<pre wrap="">Daniel Weinreb wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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)
</pre>
</blockquote>
<pre wrap=""><!---->
OK, but does it really buy you anything, compared to just calling a
specific function directly? Your examples all seem to contain only one
format directive.
</pre>
</blockquote>
Yes, I just realized that these aren't the best examples.<br>
They are intended to be used inside more complex<br>
format strings, and then the developers get used<br>
to using the format directives rather than learning<br>
the names of the corresponding functions, just<br>
to have one less thing to learn.<br>
<br>
This is a specifier for a scheduled flight:<br>
<br>
(format nil "F,~A,~A,~@[~A~],~/loc%YYYY-MM-DD/"<br>
(sched:flight-key-carrier key)<br>
(sched:flight-key-number key)<br>
(sched:non-blank-operational-suffix
(sched:flight-key-op-suffix key))<br>
(sched:flight-key-date-local key)))<br>
<br>
<blockquote cite="mid:m2lj28d9o8.fsf@lrde.epita.fr" type="cite">
<pre wrap="">
I reckon it is in general. It's just that if you're writing a library
(as opposed to a top-level application), then you don't want to pollute
the cl-user package (in fact, you just can't if you want to be on the
safe side), so even when your code is (in-package :long.package.name),
you still need to use the package prefix in the format string, and
/that/, I find totally unusable.
</pre>
</blockquote>
Well, we find it very useful. I think there is no need<br>
to prolong this part of the conversation; I think<br>
everyone here is a pro and can understand the<br>
plusses and minuses.<br>
<br>
-- Dan<br>
<br>
</body>
</html>