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-20 (14:28)
From: Brian Smith <blsmith@b...>
Subject: Re: [Caml-list] productivity improvement
Oleg wrote:
> You will need to modify the original node type and function "eval" by adding 
> an extra pattern to "match" statement, and then recompile everying that 
> depends on it. At the same time, with C++ the type of node remains the same. 
> You just need to derive a new class  from it:

I am wondering about this point too. But, perhaps you can use O'Caml 
classes to do the same thing as the C++ template classes?

Anway, I think that the above "problem" can also be an asset. If you are 
building an interpreter, and you add a new construct to the interpreted 
language, then all code that claims to know about every construct will 
become erroneous, and so you will know right away what new code needs to 
be added. There doesn't seem to be anything like that in an 
inheritance-based model.

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