Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Why setq/set! is a Special Form?

Name: Anonymous 2013-06-22 20:36

What stops use from replacing setq/set! with explicit memory cells? That would at least make it a function instead of a special form and compiler could still easily inline it.

I.e. a for loop would look like:

(let (I (cell 0))
  (while (< I 10)
    (print I)
    (I 'now (+ I 1))))

Name: Anonymous 2013-06-22 20:40

>>1
Moreover, such approach gives us ability to pass such `cell` as an argument. While you can't take a pointer to a usual variable, cells are pointers themselves.

Name: Anonymous 2013-06-22 20:47

`
Le githubber face

Don't change these.
Name: Email:
Entire Thread Thread List