Now that I have thought more about it, I have come to the conclusion that forbidding not to reference the result is in fact not a good idea.
The problem is not so much about benchmarks where one could simply wrap a call whose result would otherwise be unused in a call to `reference-barrier` or the like from SRFI 124 to make sure that the result appears to be used.
Much worse, problems would already show up with day-to-day code:
(let ((x (append! list1 list2)))
(write (if write? x #f)))
In case the flag ‘write?’ isn't set, the result of ‘append!’ may never be referenced (note that the Scheme implementation may optimize the above code by eliminating the variable `x` altogether).
--
Marc
To unsubscribe from this list please go to http://www.simplelists.com/confirm.php?u=oa8YQq670QJsajDJIblEsMJ9MoezHUAm