The ListMom for FWP has asked that this thread be removed from that list.
Please edit your submissions accordingly.
-r
--
email: [EMAIL PROTECTED]; phone: +1 650-873-7841
http://www.cfcl.com/rdm- my home page, resume, etc.
http://www.cfcl.com/Meta - The FreeBSD Browser, Meta Project, etc.
On Mon, 18 Mar 2002, Jim Cromie wrote:
> Rich Morin wrote:
>
> > At 11:24 PM -0500 3/6/02, Uri Guttman wrote:
> >
> >> qn would be just like qq but not allow any
> >> direct hash interpolations (%foo or %foo{bar}). you can always get those
> >> with $() if needed. this solves the common c
Rich Morin wrote:
> At 11:24 PM -0500 3/6/02, Uri Guttman wrote:
>
>> qn would be just like qq but not allow any
>> direct hash interpolations (%foo or %foo{bar}). you can always get those
>> with $() if needed. this solves the common case with a minimal of noise
>> and the uncommon case h
On 10 Mar 02 at 11:14:26PM, Uri Guttman wrote:
> i really think that the printf format spec is so standard and ingrained
> that changing it with # for % or requiring \% is not a good idea.
>
> but then again, backwards compatibility is not a rule you must always
> obey. i just think in this case
On 10 Mar 02 at 11:14:26PM, Uri Guttman wrote:
> i really think that the printf format spec is so standard and ingrained
> that changing it with # for % or requiring \% is not a good idea.
>
> but then again, backwards compatibility is not a rule you must always
> obey. i just think in this case
> "PS" == Peter Scott <[EMAIL PROTECTED]> writes:
PS> At 01:39 AM 3/11/02 +0100, Eugene van der Pijll wrote:
>> Why not replace the escape character '%' with '#'? No new quoting
>> operators or functions to learn.
PS> Beat me to it.
>> And introduce a warning if there are
>> no
At 01:39 AM 3/11/02 +0100, Eugene van der Pijll wrote:
>Why not replace the escape character '%' with '#'? No new quoting
>operators or functions to learn.
Beat me to it.
>And introduce a warning if there are
>no #'s in the format string.
Maybe if it's a constant, but not if you're doing someth
> "BD" == Brent Dax <[EMAIL PROTECTED]> writes:
BD> Uri Guttman:
BD> # $prec = %hash{width} ;
BD> # sprintf( qf"%${prec}s", $string);
BD> #
BD> # sprintf( "\%${prec}s", $string);
BD> #
BD> # is one of your alternatives. :-/
BD> You forgot one.
BD> sprintf('%'_%hash{width
Why not replace the escape character '%' with '#'? No new quoting
operators or functions to learn. And introduce a warning if there are
no #'s in the format string.
Eugene
Uri Guttman:
# > "BD" == Brent Dax <[EMAIL PROTECTED]> writes:
#
# BD> I think qn counts as weird syntax. I ask again, what's
# wrong with one
# BD> of:
#
# BD> sprintf("%hash\%s", $string);
#
# BD> sprintf(%hash.'%s', $string);
# BD> sprintf('%s%s', _%hash,
> "BD" == Brent Dax <[EMAIL PROTECTED]> writes:
BD> I think qn counts as weird syntax. I ask again, what's wrong with one
BD> of:
BD> sprintf("%hash\%s", $string);
BD> sprintf(%hash.'%s', $string);
BD> sprintf('%s%s', _%hash, $string);
what if you want to use %hash{width}
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.
# T
Uri Guttman:
# 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 seem
> "a" == abigail <[EMAIL PROTECTED]> writes:
a> On Wed, Mar 06, 2002 at 11:15:30PM -0500, Uri Guttman wrote:
>>
>> good point. $() can still wrap that but then there has to be a balance
>> between printf strings and double quoters. how about this wacky idea:
>>
>> make a new ty
On Wed, Mar 06, 2002 at 11:15:30PM -0500, Uri Guttman wrote:
> > "BL" == Bart Lateur <[EMAIL PROTECTED]> writes:
>
> BL> On Wed, 6 Mar 2002 17:57:07 -0500, Uri Guttman wrote:
> >> how often will you need to interpolate a hash?
>
> BL> A whole hash: quite rarely. A hash item: a LOT. Don
On Wed, Mar 06, 2002 at 11:24:57PM -0500, Uri Guttman wrote:
> that is another point. not allowing a complete hash to interpolate. but
> what defines that? what if you wanted %s{bar} and that was a format and
> not a hash and in a double quoted string? my proposal handles that well
> with no major
At 11:24 PM -0500 3/6/02, Uri Guttman wrote:
> qn would be just like qq but not allow any
>direct hash interpolations (%foo or %foo{bar}). you can always get those
>with $() if needed. this solves the common case with a minimal of noise
>and the uncommon case has a simple out of using $(). no
> "BD" == Brent Dax <[EMAIL PROTECTED]> writes:
BD> Uri Guttman:
BD> # printf "%d hash is $(%foo.string)", $bar ;
BD> #
BD> # no ambiguity and no confusion. how often will you need to
BD> # interpolate a
BD> # hash?
BD> As others have pointed out, %foo{BAR} has to work.
> "BL" == Bart Lateur <[EMAIL PROTECTED]> writes:
BL> On Wed, 6 Mar 2002 17:57:07 -0500, Uri Guttman wrote:
>> how often will you need to interpolate a hash?
BL> A whole hash: quite rarely. A hash item: a LOT. Don't forget that
BL> $foo{BAR} will now become %foo{BAR}
good point. $()
Uri Guttman:
# printf "%d hash is $(%foo.string)", $bar ;
#
# no ambiguity and no confusion. how often will you need to
# interpolate a
# hash?
As others have pointed out, %foo{BAR} has to work. But I have another
question for you: what's wrong with
sprintf '%d hash is %s', $bar,
--- Bart Lateur <[EMAIL PROTECTED]> wrote:
> On Wed, 6 Mar 2002 17:57:07 -0500, Uri Guttman wrote:
>
> >how often will you need to interpolate a hash?
>
> A whole hash: quite rarely. A hash item: a LOT. Don't forget that
> $foo{BAR} will now become %foo{BAR}
Of course, it could also become %s.
On Wed, 6 Mar 2002 17:57:07 -0500, Uri Guttman wrote:
>how often will you need to interpolate a hash?
A whole hash: quite rarely. A hash item: a LOT. Don't forget that
$foo{BAR} will now become %foo{BAR}
--
Bart.
> printf "%d hash is $(%foo.string)", $bar ;
> no ambiguity and no confusion.
This would be nice, if scalar things use '$'. But:
perl5: printf "%d is $foo{bar}", $baz;
perl6: printf "%d is $(%foo{bar})", $baz;
Not so nice.
Dave.
> "BC" == Bernie Cosell <[EMAIL PROTECTED]> writes:
BC> I wonder if the solution is to look at it the other way: that you
BC> have to do something to get interpolation to happen. If we look
BC> at it from the old adage of making the more common things simpler,
BC> at least in my co
24 matches
Mail list logo