Browse thread
[Caml-list] Stupid question
[
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: | Brian Hurt <bhurt@s...> |
| Subject: | Re: [Caml-list] Stupid question |
On Fri, 16 Jan 2004, Jacques Garrigue wrote:
> From: skaller <skaller@tpg.com.au>
> Yes indeed.
> But the compiler is clever enough to use specific comparison functions
> when the type is known to be int or float.
> Since bool looks like a subset of int, one might expect it to be
> optimised also. However, bool is just a normal sum type, and since
> some sum types have non-constant constructors, in general sum types
> require a recursive comparison operation.
> For types where constructors are constant, this might be optimised...
OK. This makes more sense. Well, except for the nitpicking detail that
true and false are not valid variant type identifiers, they should be True
and False.
--
"Usenet is like a herd of performing elephants with diarrhea -- massive,
difficult to redirect, awe-inspiring, entertaining, and a source of
mind-boggling amounts of excrement when you least expect it."
- Gene Spafford
Brian
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners