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] Rule based language [was: productivity improvement]
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Alessandro Baretta <alex@b...>
Subject: Re: [Caml-list] Rule based language [was: productivity improvement]

Oleg wrote:
> Alex,
> This looks pretty simple. What makes you think the program is a compelling 
> evidence of O'Caml superior productivity?

197 lines of code, including whitespace and commments. I 
think it is a pretty clear example of how you can write cool 
software in O'Caml in a very short time. If you had not been 
"lazy", as you said, and had tried implementing the same 
language in C++, I strongly doubt you could have written a 
more compact source.

> Is the idea to make a maximally efficient program? In that case, what kind of
> a) number of different tokens
> b) dataset size
> c) ruleset size
> d) rules size
> are we looking at?
> Regards
> Oleg

 From the standpoint of benchmarking, we'll need to write 
several test cases to see how the execution times scale with 
  program size. We might actually want to write an automatic 
testcase generator. I do no expect a C++ compiler to be able 
to beat ocamlopt by a significant amount, unless you use an 
optimized algorithm, different form the one I implemented. 
Anyhow, we shall take up the quest for benchmarking after 
your C++ clone of my "rules" program will be available.

BTW, if you wish to extend the language with other 
constructs, such as pattern matching rules, I'm willing to 
do this. Such constructs would probably increase the 
"lines-of-code" ratio of the C++ vs. O'Caml versions.


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