Dave Storrs wrote:
>
> On Fri, 11 Aug 2000, David L. Nicol wrote:
>
> > I've started talking about "containers" instead of arrays and hashes
> > since those both tie directly to implementation details, and containers
> > are abstractions.
> [...]
> >
> > If hashes normally had a sort method of null, they would work normally,
> > but you could overload the sort method of any hash with
> > What is a better syntax for this?
>
> How about:
> %foo{ {$a <=> $b} }
>
> (Obviously, you can put whatever you want as the sort function.)
>
> Here are the advantages I see:
> - minimum syntax required
> - very clear what you're doing:
> 1) % is only used to refer to a hash as a whole
> 2) you generally don't use code refs as keys
>
> Dave
Excellent! The thing the parser would look for (rather, the bad syntax
exception handler, since %foo{{expression}} is generally meaningless
is that the code in there involves $a and $b
Shall we make its own RFC or try to include it in another?
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
:wq