>>>>> "YS" == Yitzchak Scott-Thoennes <[EMAIL PROTECTED]> writes:
YS> Uri Guttman <[EMAIL PROTECTED]> 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.
YS> If you are going to make a special q form for sprintf strings, don't
YS> make it just skip hash interpolation. Make it treat [@$%] all as
YS> literals and only process backslashed thingies (including \qq of
YS> course). If you want to interpolate a $foo in an printf format, use
YS> %s.
YS> The idea of interpolating %foo{bar} but not %foo seems unnecessarily
YS> complicating.
but if you just disallow all direct % interpolations you can use $() or
@() to get them. now, how often have you created a format string with a
value from a hash? it is done sometimes but not nearly as often as using
%s so the $()/@() wrapper cost is low in both characters and mindspace.
and interpolating $foo in a format is useful so that is not stopped. i
have used it for format precision values. i recently discovered that
perl still supports the c style of * meaning to use the next arg for the
precision/width value. i much prefer interpolating that where it belongs
instead of matching more args up with format specifiers.
uri
--
Uri Guttman ------ [EMAIL PROTECTED] -------- http://www.stemsystems.com
-- Stem is an Open Source Network Development Toolkit and Application Suite -
----- Stem and Perl Development, Systems Architecture, Design and Coding ----
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org