Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2007-10-18 (14:10)
From: Dario Teixeira <darioteixeira@y...>
Subject: Re: [Caml-list] Smells like duck-typing

> That seems backwards from the way OO inheritance is supposed to work.  
> You don't go from a more feature-rich case to a less feature-rich case 
> -- it's the other way around.

Of course it is -- that is precisely why inheritance is the wrong
formalism for my problem!  What I need is a "reverse inheritance"
formalism, where a fully defined data structure sits at the root,
and whose descendants are PRUNED versions of the parent.

If sound (and I let the theoreticians decide on that), such a
formalism would be an interesting solution to the type of problem
that originated this thread.


Yahoo! Answers - Got a question? Someone out there knows the answer. Try it