Phil Wadler writes:
| I'm with Jon Fairbairn on this.  Negative arguments are an error
| because the domain of take and drop is the naturals.  The problem
| is that we use Int to represent naturals.  -- P
| 
| > For the people that share this sentiment, can you please
| > explain why ints that are too big should not similarly
| > give an error?  I can see both being ok, or both being
| > errors.  I just don't see why one should be ok and the
| > other an error.

I'm with Phil and Jon on this.  The "natural" domain for take
and friends is the naturals.  The question of whether negative arguments
are an error or are equivalent to zero may be slightly tricky, though:
If we did have the naturals as a type, how would we define the
predecessor function on zero?  It's either zero or undefined.  Negative
arguments to take should go the same way.

Cheers,
--Joe

Joseph H. Fasel, Ph.D.              email:  [EMAIL PROTECTED]
Technology Modeling and Analysis    phone:  +1 505 667 7158
University of California            fax:    +1 505 667 2960
Los Alamos National Laboratory      postal: TSA-7 MS F609
                                            Los Alamos, NM  87545

Reply via email to