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
Feature request : Tuples vs. records
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-02-22 (23:26)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] Feature request : Tuples vs. records
On Thu, 2007-02-22 at 20:45 +0100, Tom wrote:

> In general, there is a problem with structural (sub)typing... Although
> it seems better and in all ways superior to nominal (sub)typing from
> the theoretical point of view, practically, it is... slow. (At least
> when compared to nominal (sub)typing). 

It isn't slow if you actually use the power: your program
compiles and runs with amortised O(1) dispatch.

The equivalent C++ program can be written, and requires
a base for each method, and a base for every possible
combination of methods .. and whilst you're uploading
the sources for these combinations to the Klingon computer
network fortunately the universe suffers heat death.
[This is a good thing because there's no way you were
going to be able to pay Enterprise ISP P/L the network
traffic charges]

John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: