Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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.

Regards,
Oleg
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners