Re: RFC 124 (v1) Sort order for any hash

[email protected] (Damian Conway)
Newsgroups perl.perl6.language.objects
Message-ID <[email protected]>
   > > my %students : sorted( $ME{^1}{GPA} <=> $ME{^0}{GPA} );
   > >
   > Yes, I was thinking the same thing. Except the '$ME' thing--what's that? (I
   > must have missed that discussion...)

It's an idea that within a method call, the object reference would
not be passed as the first argument (or maybe, not *just* as the
first argument), but in a variable named $ME. I was pushing that
envelope a little.
   
   > What's wrong with @_?

We're trying to sort like this:

	sort  $student{^1}{GPA} <=> $student{^0}{GPA} ),  keys %student;

Within the %student's internals, %student is %ME :-)

Damian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.