develooper Front page | perl.perl6.language | Postings from March 2002

RE: rethinking printf

Thread Previous | Thread Next
From:
Brent Dax
Date:
March 10, 2002 13:48
Subject:
RE: rethinking printf
Message ID:
FJELLKOPEAGHOOODKEDPAEDGDFAA.brentdax@cpan.org
Abigail:
# I'd think it would be much better that '%' followed by a word *not*
# followed by a { isn't interpolated. Granted, you cannot do
# interpolation
# of hashes (well, one could always write "@{[%hash]}", just
# like in perl5,
# and there's little change of clashing with printf formats.
# There's only
# a clash if a format specifier is followed by a brace.

There's only a clash if you double-quote the format string anyway, which
is a rare thing to need to do at all.

# But the way perl6 is going, I doubt we'll see this kind of DWIM; perl6
# is going more in the way of a bondage and discipline language.

It's more like "Perl 6 is removing many inconsistencies".  This
particular case isn't incredibly different from the changes in the
precedence of open() between Perls 4 and 5.  (For those who don't
remember this or haven't read about it somewhere, open() was once a
hybrid unary and list operator, so "open FOO, 'bar' || die;" worked.)  A
minor adjustment in either the language or the user's usage was all that
was necessary to avoid problems with the change

--Brent Dax <brentdax@cpan.org>
@roles=map {"Parrot $_"} qw(embedding regexen Configure)

#define private public
    --Spotted in a C++ program just before a #include


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