Browse thread
Polymorphic recursion
[
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: | brogoff <brogoff@s...> |
| Subject: | Re: [Caml-list] Polymorphic recursion |
On Wed, 4 Apr 2007, Alain Frisch wrote: > In the present case, we have good solutions that don't require Obj. > Unless a strong case is made that performance is not adequate, there is > really no reason to use Obj. I agree with the "don't use Obj" part, but I think the current solutions are not that good. Encoding with records or objects is unclear, and while I find the encoding with recursive modules much clearer, that's still listed as an experimental feature. It also seems a bit heavy, using a recursive module just to get polymorphic recursion. Providing a type for the function and having the compiler use it is the right solution, IMO. It's not as much performance (though that is important!) as clarity, admittedly subjective, that I am judging the solutions by. -- Brian