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

Re: perhaps I've missed something ...



>>>>> "Michael" == Michael Livshin <mlivshin@xxxxxxxxxxx> writes:

Michael> sperber@xxxxxxxxxxxxxxxxxxxxxxxxxxx (Michael Sperber [Mr. Preprocessor]) writes:
>> 
>> [ snipped discussion about education ]

Michael> hi there, all of you.  I am but a humble programmer, 5 years away from
Michael> the academia, and here is my view on the subject of "set!"
Michael> overloading.  if you are only interested in academically rigorous
Michael> discussion, don't bother reading further.

Michael> 1. what I, in my naivete about PL design, take "set!" to be?

Michael> (set! <name> <value>) translates, in my mind, to: dear Scheme, please
Michael> make it so that next time I say <name>, and <name> denotes the same
Michael> thing as now, I get <value>.

But this intuition is wrong, because SET! has interaction with *place*
(in the program source code) in addition to interaction with time.

(define x 23)

(let ((x 5))
  (set! x 17))

x => 23

This is precisely the case students struggle with.

The intuition is right for data structure mutators.

-- 
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla