> In my opinion, this is not a good direction for implementations of any
> language
> to go.  The Chicken community has been repeatedly bitten by the increasing
> tendency of C compilers to do whatever they want rather than whatever makes
> sense in the context of undefined behavior (the C equivalent of "is an
> error").
> 
>[...]
> 
> In Scheme, whoever writes (begin) in a value context, even as a result
> of macro expansion, is almost certainly making a mistake,
> and the Right Thing IMO is to report an error, not to pessimize the code.

I completely agree to most of what John writes, although I wouldn't signal
an error in the case given. Code using the result of (begin) is legal, even
if it is questionable. A user _may_ want to exploit implementation defined
behaviour and the implementation shouldn't forbid this, but the implementation
should not give semantics arbitrarily (for very little gain) to something that,
strictly speaking, has no semantics in the language. So let's just give a
warning at most and do not behave in a particular way and depend on an
arbitrary interpretation that happens to give a tiny opportunity for 
optimization..


felix


_______________________________________________
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to