[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: perhaps I've missed something ...

This page is part of the web mail archives of SRFI 17 from before July 7th, 2015. The new archives for SRFI 17 contain all messages, not just those from before July 7th, 2015.

Per Bothner wrote:

> First, most "beginning students" actually have experience with
> languages (such as C or Java) that are more like the proposal.

Sorry, C and Java's models are wholly distinct.  Java's is essentially 
the same as Scheme's, and C's, well, isn't.

> Secondly, I think you're wrong about the distinction; they are
> not radically different beasts.  Semantically:
>         (set! x v)
> is arguably syntactic sugar for:
>         (set! (the-evironment 'x) v)

Then I could write

(let ([a 3]
      [b 2])

  (define (* var-name val)  ;; to-be-proposed SRFI will re-bind `*'
    (set! (the-environment var-name) val))

  (map * (list (get-symbol-from-URL ...)
               (get-symbol-from-URL ...))
         (list 1 2)))

You would no longer be able to tell which variables must be boxed and
which ones not.  Since you can, in fact, tell this in Scheme, the two
are semantically unrelated.