On Thu, Apr 4, 2019 at 11:41 AM megane <megan...@gmail.com> wrote:

The R5RS says (1.3.2) that the value of an expression with undefined
> (actually "unspecified") value has to be a valid scheme value
> ("object"), and it's up to the implementation what that value is.


That's true.  But a violation of syntax, which (begin) is, is what the
RnRS calls "an error", which is the same as "undefined behavior"
in other standards.  The program can misbehave in arbitrary ways,
and in particular the compiler is free to reject such programs
(which amounts to a failure before the program starts to run).

This is the same case as (car 1) or (substring "abc" n (- n 1))
or (let ((x 10) (x 20) ) x) or in particular (if #t).
It is completely different from (set! x 32) which returns an
unspecified value, the case you describe above.

-- 
John Cowan          http://vrici.lojban.org/~cowan        co...@ccil.org
Half the lies they tell about me are true.
        --Tallulah Bankhead, American actress
_______________________________________________
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to