HaloO,

Patrick R. Michaud wrote:
S29 doesn't show a 'sort' method defined on block/closure
invocants... should there be?


I doubt that. And to my eyes it looks funny. Only real block
methods should be useful and since the class is mostly known
at parse time unapplicable methods should be a compile error.

   my &f = { $^a <=> $^b }.assuming($^a = 3);

   say f(3); # prints 0

Would that be valid? I mean the usuage of automatic variables
in the assuming method?


Note that we already have:

    my @s = sort { $^a <=> $^b }, @a;
    my @s = @a.sort { $^a <=> $^b };

Is that the adverbial block syntax? If not how
would it look?

      my @s = sort @a :{ $^a <=> $^b };

Or with a comma after @a?


Regards, TSa.
--

"The unavoidable price of reliability is simplicity" -- C.A.R. Hoare
"Simplicity does not precede complexity, but follows it." -- A.J. Perlis
1 + 2 + 3 + 4 + ... = -1/12  -- Srinivasa Ramanujan

Reply via email to