Browse thread
[Caml-list] does class polymorphism need to be so complicated?
[
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@s... |
| Subject: | Re: [Caml-list] does class polymorphism need to be so complicated? |
The extension of Brian's code to rows with more than one field is obvious
though, isn't it?
type fbbq =
<foo: int->int; bar: unit->string; baz: unit->bool;quux: unit->unit>
class thing_processor =
object
method do_something (o : fbbq) =
(* do something that calls all those methods *)
method do_something_else (o : fbbq) =
(* do something else that calls all those methods *)
end
-- 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