> On Jun 30, 2015, at 8:10 AM, Alexey Cherkaev <[email protected]> > wrote: > > Hi Alexander, > > Thanks for your reply: I had something similar in mind (maybe I should check > out math/array). I was just wondering if there was something more Racket-like > (it still feels that SRFI is somewhat 'foreign' hack). And my last question > remains: wouldn't it be beneficial to have such a generalised 'set!' > system-wide? I understand that Racket focusses more on immutable structures, > but there are still vectors and hash-tables which are inherently mutable and > still have their niche.
This style of set! seems like a bad idea to me. Specifically, one of the basic ideas of algebraic languages is that programs are compositional. Specifically, if I write (a (b x) c), then the meaning of this term depends on the meanings of a, (b x), and c. That is, I can combine these three values to get the result. Generalized set! breaks this intuition. Specifically, (set! (aref x 0 1) 13) does not depend on the value of (aref x 0 1). Rather, it pulls apart this term and uses its subterm’s meanings. Put differently, this is lvalues. I know, I know, I sound like a pure-functional snooty-poo. John -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

