Browse thread
Pervasives.compare output type
-
Alex Baretta
-
Richard Jones
- Marcin 'Qrczak' Kowalczyk
- Oliver Bandel
- Xavier Leroy
-
Richard Jones
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Marcin 'Qrczak' Kowalczyk <qrczak@k...> |
| Subject: | Re: [Caml-list] Pervasives.compare output type |
Richard Jones <rich@annexia.org> writes:
>> type comparison_result = Less | Equals | Greater
>>
>> What are the reasons behind the present design choice?
>
> Wouldn't it be for speed? You could define Pervasives.compare over
> integers just as a subtraction.
You can't, because of overflow.
--
__("< Marcin Kowalczyk
\__/ qrczak@knm.org.pl
^^ http://qrnik.knm.org.pl/~qrczak/