Version française
Home     About     Download     Resources     Contact us    
Browse thread
Smells like duck-typing
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: William D. Neumann <wneumann@c...>
Subject: Re: [Caml-list] Smells like duck-typing
On Thu, 18 Oct 2007 17:47:45 +0200, Loup Vaillant wrote

> It feels like the problem is the keyword "inherit". It suggest
> C++/Java subtyping, while we just want code reuse. If having stories
> inheriting from one another eventually result in less code, I would
> consider that cleaner, no matter what "inherit" is supposed to mean.
> 
> Sometimes, a tool can be good at something it has not be designed 
> for. I think this might be the case, here.

Oh, I absolutely agree there.  And there are a couple of important snippets 
of the manual that seem to apply:

"Note that the relation between object, class and type in Objective Caml is 
very different from that in main stream object-oriented languages like Java 
or C++, so that you should not assume that similar keywords mean the same 
thing." and "Inheritance is a syntactic relation between classes..."


--

William D. Neumann