John Porter wrote:
> [to you only, as this thread is now distinctly off-topic for perl6-language]
Well, as Peter pointed out, I managed to utterly mis-edit my headers.
And now I can't think of an appropriate expletive to express how I feel
about it.
Guess I'm just glad what I wrote wasn't rea
>It doesn't help that Camel II's glossary defines "array" as "A named list
>of values, each of which has a unique key to identify it. In a normal
>array, the key is numeric... In a hash...the key is a string." and seems to
>go to a lot of effort to deprecate "array" in favor of "list" (array
[to you only, as this thread is now distinctly off-topic for perl6-language]
Buddha Buck wrote:
>
> @array1 = (1, 1, 3, 5, 8, 13);
> %hash1 = ('foo', 34, 'bar', "not a number", 'baz', 4);
> @array2 = %hash1;
> %hash2 = @array1;
>
> This works, and may lead to confusion because:
This is exact
At 04:11 PM 8/22/00 -0400, John Porter wrote:
>Casey R. Tweten wrote:
> >
> > There is no documentation that states:
> >
> > ``keys() just doesn't work on lists and/or arrays,
>
>Why should it bother saying that, when it already says keys() works on a
>HASH?
>
>Or is there some confusion that a H
Today around 4:07pm, John Porter hammered out this masterpiece:
: Casey R. Tweten wrote:
: >
: > Removing intermediate data structures is easy in Perl, but not this case,
:
: C, etc. must have data structures to work on. There's no "getting rid"
: of them.
Perl can create them for me.
: "I w
Casey R. Tweten wrote:
>
> There is no documentation that states:
>
> ``keys() just doesn't work on lists and/or arrays,
Why should it bother saying that, when it already says keys() works on a HASH?
Or is there some confusion that a HASH might also be an ARRAY or a LIST?
--
John Porter
Casey R. Tweten wrote:
>
> Removing intermediate data structures is easy in Perl, but not this case,
C, etc. must have data structures to work on. There's no "getting rid"
of them.
"I want find /usr to search the directory tree, but, um, I don't want to
actually *have* a directory tree..."
And at this point we seem to have run out of steam for changing perl6
in this direction. Please take dialogue on the perl5 documentation to
the perl5-porters list.
Thanks,
Nat
>There is no documentation that states:
>``keys() just doesn't work on lists and/or arrays, you must use this syntax to
>force that to work:
> @array = keys %{{@array}};
>''
>Or something like that.
keys is documented to take a hash. Likewise, push an array.
This all seems completely obvious
Today around 1:51pm, Tom Christiansen hammered out this masterpiece:
: >As a user, I should be able to expect this:
:
: I've decided I don't believe you, because despite having taught a
: zillion people Perl,
Commendable. I value your expertise.
: I have never *once* seen the misexpectation
Today around 1:41pm, Tom Christiansen hammered out this masterpiece:
: > my %hash = &func();
: > print "$_\n" foreach keys %hash;
:
: >To work just like this:
:
: > print "$_\n" foreach keys &func();
:
: >In my, 'pretending to just learn' mode, I don't understand. Perl will assign
: >the L
>As a user, I should be able to expect this:
I've decided I don't believe you, because despite having taught a
zillion people Perl, I have never *once* seen the misexpectation
and subsequent error that you're spending so much time complaining
about.
--tom
> my %hash = &func();
> print "$_\n" foreach keys %hash;
>To work just like this:
> print "$_\n" foreach keys &func();
>In my, 'pretending to just learn' mode, I don't understand. Perl will assign
>the LIST to the hash in example one, but in example two, it croaks.
A LIST is not a HASH. L
Today around 3:01pm, John Porter hammered out this masterpiece:
: Nathan Torkington wrote:
: > John Porter writes:
: > > I suppose that's true. But why would
: > > %( foo => 1, bar => 2 )
: > > be "working harder" than
: > > %{{ foo => 1, bar => 2 }}
: > > ??? It's few keystrokes and would
John Porter writes:
> So? Perl's not like that. Perl is diagonal. And this is just
> another corner being cut.
Cut away enough corners, and you have a black hole. Or something :-)
My point is that before you reach to invent new syntax, see if there's
a way to do what you want with the existi
Nathan Torkington wrote:
> John Porter writes:
> > I suppose that's true. But why would
> > %( foo => 1, bar => 2 )
> > be "working harder" than
> > %{{ foo => 1, bar => 2 }}
> > ??? It's few keystrokes and would be a less tricky concept
> > to remember.
>
> It's a new syntax, not ortho
John Porter writes:
> I suppose that's true. But why would
> %( foo => 1, bar => 2 )
> be "working harder" than
> %{{ foo => 1, bar => 2 }}
> ??? It's few keystrokes and would be a less tricky concept
> to remember.
It's a new syntax, not orthogonal to anything we already have. The
Tom Christiansen wrote:
> it's already there. One just works on the compiler to
> be smarter on optimizing.
I suppose that's true. But why would
%( foo => 1, bar => 2 )
be "working harder" than
%{{ foo => 1, bar => 2 }}
??? It's few keystrokes and would be a less tricky
>But I do agree it would be nice if there were a way to simultaneously
>construct and dereference an anonymous array or list, perhaps something
>like
> @( 1, 2, 3 )
> %( foo => 1, bar => 2 )
>which would be equivalent to
> @{[ 1, 2, 3 ]}
> %{{ foo => 1, bar => 2 }}
>bu
Jerrad Pierce wrote:
> In reply to your message from the not too distant future: next Tuesday AD
> Reply-to: [EMAIL PROTECTED]
> Return-receipt-to: [EMAIL PROTECTED]
> Organization: a) Discordia b) none c) what's that?
> Content-Typo: gibberish, charset=ascii-art
> Date: Tue, 22 Aug 2000 11:06:21
Today around 11:06am, Jerrad Pierce hammered out this masterpiece:
: >It will show that you are doing what you *want* to do, not letting
: >automagic error-blind spoofery behind the curtains flummux up
: >your life unnecessarily.
:
: Umm no.. for what I *want* to do is take the keys of the hash
In reply to your message from the not too distant future: next Tuesday AD
Reply-to: [EMAIL PROTECTED]
Return-receipt-to: [EMAIL PROTECTED]
Organization: a) Discordia b) none c) what's that?
Content-Typo: gibberish, charset=ascii-art
Date: Tue, 22 Aug 2000 11:06:21 EDT
From: Jerrad Pierce
>It wil
In reply to your message from the not too distant future: next Monday AD
Reply-to: [EMAIL PROTECTED]
Return-receipt-to: [EMAIL PROTECTED]
Organization: a) Discordia b) none c) what's that?
Content-Typo: gibberish, charset=ascii-art
Date: Mon, 21 Aug 2000 19:04:27 EDT
From: Jerrad Pierce
>No. ke
23 matches
Mail list logo