[racket-dev] `take' argument order

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Wed Jun 8 21:50:40 EDT 2011

"Take from the sequence of primes the first five numbers and add them up." This is at most slightly mangled :-) 


On Jun 8, 2011, at 11:38 AM, Eli Barzilay wrote:

> 6 minutes ago, Stephen Bloch wrote:
>> 
>> On Jun 8, 2011, at 9:55 AM, Eli Barzilay wrote:
>> 
>>> ... the
>>> justification for the argument order in Haskell is not laziness but
>>> its implicit currying -- so of course it shouldn't be a reason to make
>>> lazy racket follow it.]
>> 
>> Another justification for Haskell's argument order is compatibility
>> with English: "take 5 primes" makes a lot more sense than "take
>> primes 5".  It could be argued that compatibility with English is
>> even more important than compatibility with Clojure, or Haskell, or
>> SRFI/1, or racket/typed....
> 
> That counters a lot of existing racket functions (`list-ref' vs "the
> nth element of"), and worse -- it contradicts some uniformity (if you
> follow English, then `for-each' should not have the same order as
> `map').
> 
> -- 
>          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
>                    http://barzilay.org/                   Maze is Life!
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/dev




Posted on the dev mailing list.