Arc Forumnew | comments | leaders | submitlogin
3 points by fallintothis 5323 days ago | link | parent

Is there a good rule-of-thumb for avoiding this?

If there is, I'd like to know. Seems to be a wart: in the functional position, names are interpreted as macros if they were globally bound as such.

  arc> (mac m (x) `(list 'expanded ',x))
  #(tagged mac #<procedure: m>)         
  arc> (def foo (m) m)
  #<procedure: foo>
  arc> (def bar (m) (+ m 1))
  #<procedure: bar>
  arc> (def baz (m index) (m index))
  #<procedure: baz>
  arc> (foo 5)
  5
  arc> (bar 5)
  6
  arc> (baz "abc" 0)
  (expanded index)
There was a halfhearted thread about this at http://arclanguage.org/item?id=9696, if it's any consolation.