Browse thread
oo type question
-
Michael Wohlwend
-
Peng Zang
-
Michael Wohlwend
- Peng Zang
-
Jacques Garrigue
- Michael Wohlwend
-
Michael Wohlwend
-
Peng Zang
[
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: | Michael Wohlwend <micha-1@f...> |
| Subject: | Re: [Caml-list] oo type question |
Am Montag, 10. März 2008 09:20:43 schrieb Jacques Garrigue: ok, thanks for the explanations, > From: Michael Wohlwend <micha-1@fantasymail.de> > > A small remark yet: in interfaces (and class types) it is ok to write > class c : object > method add : #someClass -> ... > end > Here it is automatically assumed that the type variable is bound at > the method level. ah o.k, nice to know. I'll try that. (I thought declaring something to be of type #class is similar to the "implenents" declaration in java, where you can pass objects without a cast to methods accepting arguments of that interface, which I find nice :-) ) I like the oncept of ocaml to make no implizit casts; only when using objects I think casting to an upper class (!) should be done automatically since it's one of the basic "features" of oo programming. Michael