>>>>> "LP" == Luke Palmer <[EMAIL PROTECTED]> writes:

  LP> Uri Guttman writes:
  >> because that would be the default comparison and the extracted key value
  >> would be stringified unless some other marker is used. most sorts are on
  >> strings so this would be a useful huffman and removal of a redundancy.

  LP> While I like where most of this is going, I beg to differ on this point.
  LP> I end up sorting numbers more often then strings, except when I'm
  LP> sorting the keys of a hash.  I'm always annoyed in my one liners when I
  LP> have to write out:

  LP>     sort { $a <=> $b } ...

  LP> And I'd be thrilled if it were as easy as:

  LP>     sort { +$_ } ...

oh, i don't want to see <=> anywhere in sort code. i don't mind + or int
as markers for that.  you seem to actually be agreeing with me that
strings are the default key type and + is needed for a numeric sort. but
do you do integer or float sorts? and as i said, i don't like the
asymmetry of int vs +.

uri

-- 
Uri Guttman  ------  [EMAIL PROTECTED]  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org

Reply via email to