[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] Comments on draft 6
On 2012-02-24, at 12:40 AM, John Cowan wrote:
> Arthur A. Gleckler scripsit:
>> Thank you. This helps, but it's still not clear enough. I've filed Ticket
>> #350 <http://trac.sacrideo.us/wg/ticket/350> to make sure that we improve
>> this language.
> Here's my proposal:
> I think R5RS/R7RS provides too much generality and should be clawed back.
> The implementations which allow `set!` on unbound identifiers actually
> don't make the identifiers contain unspecified values.
Not true... see below.
> For example,
> we don't have implementations whose initial state binds `foo` to `'foo`
> and `bar` to `'bar`, or anything of the sort. Nor do they come back with
> `#<undef>` or silence. Instead, an error is signalled when you attempt
> to evaluate `foo` and `bar`.
Because it is allowed by the standard, and it avoids a run-time test, the Gambit compiler does not check that variables are unbound when they are accessed. For example:
% cat unbound-test.scm
(define (set-foobar x)
(set! foobar x))
% gsi unbound-test.scm
*** ERROR IN "unbound-test.scm"@1.15 -- Unbound variable: foobar
% gsc unbound-test.scm
% gsi unbound-test
Scheme-reports mailing list