Email list hosting service & mailing list manager

format strings are the Right Thing Alex Shinn (29 Dec 2003 03:08 UTC)
Re: format strings are the Right Thing Tom Lord (29 Dec 2003 06:29 UTC)
Re: format strings are the Right Thing Paul Schlie (29 Dec 2003 19:52 UTC)
Re: Another alternative Shiro Kawai (30 Dec 2003 04:01 UTC)
Re: Another alternative Paul Schlie (30 Dec 2003 05:08 UTC)
Re: Another alternative (Re: format strings are the Right Thing) Taylor Campbell (31 Dec 2003 01:48 UTC)

Re: Another alternative (Re: format strings are the Right Thing) Taylor Campbell 31 Dec 2003 01:48 UTC

On Dec 29, 2003, at 11:22 PM, Alex Shinn wrote:

[Order of reply is changed slightly.]

> I think the primary arguments are against using any kind of
> mini-language at all vs. just using normal function composition of
> write and display.

No.  It's against _badly_designed_ mini-languages, and _especially_
those
encoded in the totally wrong data structure: strings (which we still
aren't
particularly solid on the definition & usage of, with regard to
character sets,
Unicode, multi-byte stuff, et cetera).  Marc Feeley had another point,
too:
that separating the directive and the argument to that directive is a
bad idea.
You state that separating them is separating data from logic, but it is
not:
the data is the _combination_ of directive and input; the logic is what
uses
that data to produce the final output.

(Before you say something along the lines of 'this whole SRFI is about
strings;
why on earth would you want to avoid them?' let me state that the
formatting
_output_ is about strings (whether it be in Scheme's string structure,
in some
future string structure in, for any n such that n > 5, RnRs, in output
ports,
in streams, or anything), but the formatting routines themselves can be
much
more structured; likewise, SREs' _input_ deals with processing of
strings, but
the code to use & manipulate SREs is a lot more structured than as the
obscure,
string-encoded format of POSIX regexps.)

> But SRE is still a mini-language.  Indeed, I've been suggesting
> possibilities of using arbitrary lists or more verbose format strings.

Verbose format strings aren't much better than format strings with
single-
character directives: they still have all the above problems.

What do you mean by 'using arbitrary lists?'  I don't believe you've
described
this alternative in great detail, or if you have, my scouring of the
archive
has proven fruitless.