Arc Forumnew | comments | leaders | submitlogin
4 points by absz 5844 days ago | link | parent

You yourself gave an example. The fact that Arc allows destructuring (that is, writing (let (a b) lst ...)) means that the presence of a list is not an adequate indicator of whether you're letting or withing. And without that, how do you know when you're done defining variables? If you don't parenthesize them, they could go on forever. The only other option is to remove the implicit do in let/with; that way, only the last statement would be run, and the first n would be variable bindings; to run more than one, you would use do.


2 points by bOR_ 5844 days ago | link

Got it :)

  arc> (= b "abba")
  "abba"
  arc> (let (a b) (list 1 2) (pr a b))
  121
  arc> b
  "abba"
  arc> (with (a b) (list 1 2) (pr a b))
  abbaabba"abba"
  arc>

-----