Re: Various comments dyb@xxxxxx (24 Jun 2006 14:53 UTC)
Re: Various comments Jorgen Schaefer (24 Jun 2006 15:38 UTC)

Re: Various comments Jorgen Schaefer 24 Jun 2006 15:38 UTC

xxxxxx@cs.indiana.edu writes:

>> Section 3 mentions "singleton identifiers" as a possible form for
>> syntax abstractions, and refers to section 3.6 for more information. I
>> couldn't find this in 3.6.
>
> This should probably have been a reference to Section 3.4, which mentions
> what happens when a keyword appears in ``any other definition or
> expression context,'' i.e., not in the first position of a list-structured
> input form.

So (+ 2 two) could very well cause a side effect, if TWO is
syntax.

I have a serious problem with this. It makes understanding
programs more confusing. So far, in Scheme, I know that (foo ...)
is a form that does something, and to find out what it does, I
need to know what FOO does. If something does not show up at the
first position in a list, it's a variable reference (or, very
rarely, a specific syntactic keyword similar to ELSE; but this
only within the appropriate macro).

This feature means _any_ symbol could cause _anything_ to happen.

This makes programs much more difficult to understand, and this
for the sole reason of saving one to write two parens. I don't
think this is worth it.

> [...]
>
> whereas variable transformers allow one to define what happens with
> "ordinary" assignments of the form
>
>   (set! id e)
>
> This can be used, for example, to allow method bodies in an OOP system to
> access instance variables as if they were ordinary variables, by
> transforming references into the appropriate instance access operations
> and assignments into the appropriate instance mutation operations.

Ditto here, this extension serves mostly to obscure code. It is
not much of a problem to write (set! (id) e) or even (set! (class
id) e), and be explicit in what you're doing here (using SRFI-17
or something similar).

I don't think saving two parens is worth the complexity and the
obscurity these features add.

Regards,
        -- Jorgen

--
((email . "xxxxxx@forcix.cx") (www . "http://www.forcix.cx/")
 (gpg   . "1024D/028AF63C")   (irc . "nick forcer on IRCnet"))