On Thu, May 06, 1999 at 09:33:15PM +0200, Bart Demoen wrote:
> > Without optimizations this program will produce _|_ but
> > with optimizations it will produce 3.
>
> wouldn't such an optimisation be called "a bug in the compiler" ?
or a bug in the language design if it allows such things, It is my guess that
with such powerful compile time rule rewriting you can not check for these cases
decideably... I once fooled around with the idea of adding such features to a
toy language and came upon similar problems.... the only workable solution i
could figure out was to not make them an 'optimization' step, but rather a well
defined part of the compile phase and the language, if you always know how the
expressions will be expanded or whatnot then it is up to the programmer to get
it right...
perhaps a weaker form of this sort of thing where lazy semantics are always
maintained can be formulated...
John
--
--------------------------------------------------
John Meacham http://synergy.foo.net/~john/
[EMAIL PROTECTED]
--------------------------------------------------