On 27/06/2011 18:15, Jean-Marc Vanel wrote:
Now I come to my question. Since the compiler can know that the
function Pascal is declarative and without side-effects, why doesn't
it do one of these :
- 1. warn about the duplicated call {Pascal N-1}
- 2. actually inline the duplicated call in the generate binary output
I would prefer 1. , to encourage a clean code .
Good question! The answer is simple: the Mozart compiler does not try
to be clever. It does a straightforward translation of the source code.
Peter
_________________________________________________________________________________
mozart-users mailing list
mozart-users@mozart-oz.org
http://www.mozart-oz.org/mailman/listinfo/mozart-users