develooper Front page | perl.fwp | Postings from March 2002

Re: rethinking printf

Thread Previous | Thread Next
From:
sthoenna
Date:
March 10, 2002 13:26
Subject:
Re: rethinking printf
Message ID:
Wv8i8gzkg6MI092yn@efn.org
 <200203070415.XAA07617@home.sysarch.com.> <20020310192859.1888.qmail@foad.org>
 <200203101957.OAA17842@home.sysarch.com.>
Lines: 17

In article <200203101957.OAA17842@home.sysarch.com.>,
Uri Guttman <uri@stemsystems.com> wrote:

>i disagree. but we shall see if larry is listening to this thread and
>will back away from hash interpolation or take some of our suggestions
>that make it work without killing format strings. i hate to see a
>special call or wierd syntax for that. my qn (or qf) suggestion seems to
>have some backing and it is clean and unobtrusive.

If you are going to make a special q form for sprintf strings, don't
make it just skip hash interpolation.  Make it treat [@$%] all as
literals and only process backslashed thingies (including \qq of
course).  If you want to interpolate a $foo in an printf format, use
%s.

The idea of interpolating %foo{bar} but not %foo seems unnecessarily
complicating.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About