> "Bart" == Bart Lateur <[EMAIL PROTECTED]> writes:
Bart> On Tue, 22 Aug 2000 00:03:48 -0600 (MDT), Nathan Torkington wrote:
>> Normally what you'd say is:
>>
>> with (%record) {
>>
>> }
>>
>> (look at me, using Larry's new ... operator :-)
Bart> No you didn't. You typed four dots.
T
-Original Message-
From: Bart Lateur [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 23, 2000 7:00 PM
To: [EMAIL PROTECTED]
Subject: Re: PROTOPROPOSAL FOR NEW BACKSLASH was Re: implied pascal-like
"with" or "express"
On Tue, 22 Aug 2000 00:03:48 -0600 (MDT), Nat
On Thu, 24 Aug 2000 02:02:06 +0200, Markus Peter wrote:
>$one{two\three\four} instead of $$$one{two}{three}{four}
Isn't that
$one{two}{three}{four}
--
Bart.
On Tue, 22 Aug 2000 00:03:48 -0600 (MDT), Nathan Torkington wrote:
>Normally what you'd say is:
>
> with (%record) {
>
> }
>
>(look at me, using Larry's new ... operator :-)
No you didn't. You typed four dots.
--
Bart.
Correct me if I'm wrong here, but I think what David wanted was an easy way
to reference other keys of an hash while creating one, ie:
How to do this, in a line:
%h = ( first => 10 );
$h{second} = $h{first} * 2;
Because, as I'm sure you know, this code (when run w/out strict):
David L. Nicol writes:
> Do either of those expressions make sense in terms of
> references to something? If not, then syntactically we
> are in the clear. They don't, because currently it makes
> no sense to butt a reference up to the LHS of anything.
>
> It isn't any less clear than, for inst
On Wed, Aug 23, 2000 at 12:17:18AM +, David L. Nicol wrote:
> Nathan Torkington wrote:
> > The precedent of "if you're doing a hash
> > lookup, use {} around the key" is fairly well-ingrained in Perl.
>
> I don't care how "ingrained" the concept of wrapping the
> field names in curlies is, I
Nathan Torkington wrote:
> Except that you often don't know the keys in advance, and so now
> your code turns into:
>
> with %one\$keytwo {
> push @\$keythree\$keyfour, 5, 6;
> }
>
> which is decided sub-clear.
Do either of those expressions make sense in terms of
references to some
David L. Nicol writes:
> okay but we still have the hiding issue, in case we want it to
What's the hiding issue? I must have missed that.
> $one{two} is $one\two
> $$one{two}{three} is $one\two\three
> $$$one{two}{three}{four} is $one\two\three\four
Your le
On Tue, 22 Aug 2000, David L. Nicol wrote:
> And you dont have to make sure the $s on the left of the names match
> the {}s on the right, just use one $ and string the names together with
> backslashes. This is not easier?
>
>
> $one{two} is $one\two
> $$one{two}{three}
Nathan Torkington wrote:
> # making this part up
> struct Person => [ qw(Name Age Height Weight) ];
> # but once you have a named structure, you can say ...
> my Person %nat;
> with (%nat) {
> $Name = "Nathan"; # rewritten to $nat{Name} at compile-time
> ...
> }
>
> It's ki
Markus Peter writes:
> > use %record{
> >
> > $\interest_earned += $\balance * $\rate_daily;
> > };
Guys, where in the sweet name of Jesus did this awful syntax
come from?
For a start,
%start{ }
is only analogous to a slice operation. It has no precedent in
Perl.
Normally what
--On 18.08.2000 14:36 Uhr -0700 David L. Nicol wrote:
> How about backslash, after the type-qualifier?
>
> use %record{
>
> $\interest_earned += $\balance * $\rate_daily;
> };
I don't really like having backslashes in front of ordinary characters
anywhere except when I mean them :-) (\n,
Dave Storrs wrote:
> The following words could also be overloaded for this purpose:
> map, use
I think I like
use %record{
is a macro that expands to
{my \%_ = \%record;
even better than the same thing without the key word.
14 matches
Mail list logo