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
Re: [Caml-list] productivity improvement
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-07-19 (10:37)
From: Oleg <oleg_inconnu@m...>
Subject: Re: [Caml-list] productivity improvement
On Friday 19 July 2002 04:57 am, Andreas Rossberg wrote:
> And how would you do more complex case analysis, corresponding to nested
> patterns? 

I think I know what nested patterns are (something like 
Node (x, y, Bla(1, _)) -> ...), but I don't see where any extra difficulty 
will come from while using virtual functions. Could you give specific 
examples please?

> This is more than cumbersome and error-prone in C++ - with
> RTTI, and even more so with method dispatch, where your single algorithm
> will have to be scattered over tons of distant functions. A maintenance
> nightmare.

Why would maintaining code organized by data type be harder? Isn't it what 
encapsulation is all about?

> BTW, as Issac noted, you cannot even use switch statements to perform
> RTTI in C++. You have to program if cascades.

That is correct. I never actually had to use RTTI, so I thought typeid could 
be converted into int.

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: