[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: perhaps I've missed something ...
I am sorry to see that there is such a huge misunderstanding in our own
community.
1. Levels of programmers aside, set! and set-field-of-something! are two
different concepts:
- set-field-of-something! is an operation on a piece of data that is
first-class.
- set! is a about mutating a _variable_, which is a syntactic
constructor.
The idea of reifying the environment and introducing an invalid modifier
on it doesn't change this. It only emphasizes it.
If it weren't for set!, Scheme would be a perfect data-oriented language
on top of mathematics (and thus mathematical reasoning).
2. If we throw out let's, and I am all in favor, we should throw out
internal define as well. It's an embarrassment that Scheme doesn't get
the move from global defines to local defines right.
If you don't know what I mean, evaluated the following
(define x ((lambda (z) (lambda (w) w)) y))
(define y 5)
(x 10)
Now move the define's into local positions:
(define (f) (begin
(define x ((lambda (z) (lambda (w) w)) y))
(define y 5)
(x 10)))
(f)
Why in the world do we assign different semantics to the two?
[DrScheme has local in the teaching languages and does preserve
the positive and the negative semantics.]
-- Matthias