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
- RE: drop & take [was: fixing typos in Haskel... BYRNE, Peter
- RE: drop & take [was: fixing typos in H... S. Alexander Jacobson
- Re: drop & take [was: fixing typos ... Dr. Mark E. Hall
- RE: drop & take [was: fixing typos in H... Simon Peyton-Jones
- Re: drop & take [was: fixing typos ... Ola Fosheim Gr�stad
- Re: drop & take [was: fixing ty... Pablo E. Martinez Lopez
- Re: drop & take [was: fixin... Ola Fosheim Gr�stad
- Re: drop & take [was: fixing typos in H... Chris Okasaki
- Re: drop & take [was: fixing typos ... Tommy Thorn
- Re: drop & take [was: fixing typos ... Philip Wadler
- Re: drop & take [was: fixing ty... Joe Fasel
- Re: drop & take [was: fixing ty... Chris Okasaki
- Re: drop & take [was: fixin... Philip Wadler
- Re: drop & take [was: fixin... Joe Fasel
- Re: drop & take [was: fixin... Fergus Henderson
- Re: drop & take [was: fixing typos ... D. Tweed
- Re: drop & take [was: fixing ty... D. Tweed
- Re: drop & take [was: fixing typos ... Matt Harden
- RE: drop & take [was: fixing typos in H... Roberto E. Lublinerman
- Re: drop & take [was: fixing typos in H... Marcin 'Qrczak' Kowalczyk
- Re: drop & take [was: fixing typos ... Hamilton Richards
