Browse thread
Objects, dynamic cast, Obj.magic abuse and dragons
[
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: | Richard Jones <rich@a...> |
| Subject: | Re: [Caml-list] Objects, dynamic cast, Obj.magic abuse and dragons |
On Tue, Feb 26, 2008 at 03:28:01PM +0100, Berke Durak wrote: > Your solution first seemed like a kludge but, given the alternatives, it > appears to be the best solution. [...] > And it's reasonably efficient (after all, we're using objects here.) Yeah, I suspect the real lesson here is don't use objects at all. They are rarely as useful as people make out, and most uses of them seem to be because lesser languages lack good compiler checks on variants. After all, there's no real problem at all spreading match statements around the program if I can be sure that the compiler will highlight everywhere which needs to change when I change my variant. Rich. -- Richard Jones Red Hat