[r6rs-discuss] [Formal] Disallow redefinitions macros/variables

From: Paul Schlie <schlie>
Date: Wed Mar 28 15:05:16 2007

William D Clinger wrote:
> ...
> Andre van Tonder correctly observed that the change to letrec*
> semantics for internal definitions will make optimization more
> difficult ...
>
> With the letrec semantics of R5RS and previous reports, programmers
> didn't have to follow those rules because compilers were allowed to
> reorder internal definitions. ...

Personally, I see no value in not specifying the logical evaluation order
for the language, as any expressions insensitive to their evaluation order
may be inherently reordered to suite optimization goals as may be desired,
and correspondingly any expressions which may be sensitive to their
evaluation order should not be allowed to be arbitrarily reordered as it
would render their resulting semantics useless.

I would think the role of a language specification is to minimize potential
ambiguities, not introduce/support them for the express purpose of enabling
tools to simply ignore such potential interdependencies. (Languages should
be specified to make the lives of their users easier, not the lives of
compiler writers at the expense of the former.)

Thereby if a tool simply chooses not to attempt to analyze the prospect of
such interdependencies, it should just as simply not be allowed to presume
there are none. (As such "optimizations" are not truly useful if done in
ignorance of their consequence; correspondingly if such consequences are
determinable, then that information is likely better used to inhibit their
semantically destructive application.)
Received on Wed Mar 28 2007 - 15:04:35 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC