Arc Forumnew | comments | leaders | submitlogin
4 points by fallintothis 5182 days ago | link | parent

t is merely a global variable

Except you can't destructively update it. So it's really more of a global constant. This is an important caveat because it affects locally scoped ts, too.

  arc> (= t 1)
  Error: "Can't rebind t"
  arc> (= nil 1)
  Error: "Can't rebind nil"
  arc> (let t 4 (+ t 1))
  5
  arc> (let t 4 (++ t))
  Error: "Can't rebind t"
I imagine that's what made it seem reserved. You still probably shouldn't name variables t or nil.


2 points by aw 5182 days ago | link

Except you can't destructively update it

Hmm, good point. Since it does no harm to change t when it is a local variable, I'd remove the restriction for that case.

I might even drop the restriction altogether, as it doesn't seem to have much useful purpose. I can break Arc just as badly by rebinding "car" or other variables, so why this particular effort to keep me from hurting myself?

-----

1 point by meric 5182 days ago | link

That doesn't change the fact that I shouldn't use t for anything other than `t`, but good point.

-----