> > > %professors{ $a->name cmp $b->name };
> > >
> > > %students{ $$students{$b}{GPA} <=> $$students{$a}{GPA} };
> >
> > These already mean something. Please don't "special-case" them.
>
> No they don't.
Apologies. You're quite correct.
> > Isn't this better handled with a (revamped and faster) tie?
> >
> > tie %professors, 'Tie::Sorted', ^a->name cmp ^b->name;
> >
> > tie %students, 'Tie::Sorted',
> > $$students{^1}{GPA} <=> $$students{^0}{GPA} };
> >
> > Damian
>
> It's a shorthand for it.
But not an obvious one, I fear. I'd be happier if it were more
"assignment-ish", say:
%professors = ^a->name cmp ^b->name;
%students = $$students{^1}{GPA} <=> $$students{^0}{GPA} };
Actually, no I wouldn't.
I'd be happier if it were more explicit.
How about:
keys %professors = ^a->name cmp ^b->name;
keys %students = $$students{^1}{GPA} <=> $$students{^0}{GPA} };
;-)
Damian
- Re: RFC for $ME class variabl... John Siracusa
- Re: RFC for $ME class variabl... Nathan Wiger
- Re: RFC for $ME class variabl... Bart Lateur
- Re: RFC for $ME class variabl... Nathan Wiger
- Re: RFC for $ME class variabl... Randal L. Schwartz
- Re: RFC for $ME class variabl... Bryan C . Warnock
- Re: RFC for $ME class variabl... Graham Barr
- Re: RFC for $ME class variable (w... Piers Cawley
- Re: RFC for $ME class variable (w... David L. Nicol
- RFC for $ME class variable (was Re: RF... Nathan Wiger
- immediate "with" syntax and Sort order f... Damian Conway
- immediate "with" syntax and Sort ord... David L. Nicol
- RE: RFC 124 (v1) Sort order for any hash Brust, Corwin
- Re: RFC 124 (v1) Sort order for any hash as an exa... David L. Nicol
