[
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: | bluestorm <bluestorm.dylc@g...> |
| Subject: | Re: [Caml-list] Converting variants with only constant constructors to integers |
Beware that "%identity" is an unsafe feature that breaks all safety guarantees if used badly. If you were, for example, to change your definition of "foo" (in a way not always representable as integers, such as adding a constructor with parameters), int_of_foo would become incorrect. The compiler wouldn't warn you, and you could get pretty bad failures (segfaults). You're on your own.