[
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: | John Prevost <j.prevost@c...> |
| Subject: | Re: [Caml-list] What about polymorphic methods? |
>>>>> "jg" == Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp> writes:
jg> With the CVS version, you would have to write
jg> method left_iter : 'b. ('a -> 'b) -> 'b list = fun f -> ...
jg> method right_iter : 'b. ('a -> 'b) -> 'b list = fun f -> ...
jg> Of course, 'b is no longer a parameter of the class. Note
jg> that polymorphic methods can only be called on objects whose
jg> type is (at least partially) known, so you may have to add a
jg> few extra type annotations to your code.
They're coming back? Woohoo!
What will the restrictions on typing be, precisely?
John.
-------------------
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