Version française
Home     About     Download     Resources     Contact us    
Browse thread
Class/prototype-based OO
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David Baelde <david.baelde@g...>
Subject: Class/prototype-based OO
Hi list,

After having had to learn Java, I was annoyed by the lack of subtyping
compared to OCaml. In Java two identical classes with different names
cannot be used identically. I then re-read Wikipedia's articles on
prototype-based [1] and class-based [2] OO. I used to be convinced
that OCaml was cited in the first category. It is not the case, and I
see now that the question is not trivial.

It is said that prototype-based OO is criticized for being too
dynamic, I believe that OCaml style of OO is an example of static
language having at least the most interesting features of
prototype-based OO.

Any opinion?

If I remember well, I didn't like the duck-typing article either,
which authors didn't seem to know OCaml. Our language makes the
boundary between static and dynamic languages more complex.

Cheers.
-- 
David

[1] http://en.wikipedia.org/wiki/Prototype-based_programming
[2] http://en.wikipedia.org/wiki/Class-based_OOP