Arc Forumnew | comments | leaders | submitlogin
1 point by akkartik 3914 days ago | link | parent

Wart isn't that different from arc, it still shows its roots.

  for x 1 (x < 10) ++x
    prn x

  map prn '(1 2 3 4 5 6 7 8 9 10)

  def (f n)
    prn n
    if (n < 10)
     (f n+1)
  f.1
Unlike smile it needs those parens around the if condition.

Edit 13 hours later: Ack, I was wrong. Wart would drop the parens just fine!

  if n < 10
   (f n+1)
I'm not sure I like it, but the design of infix fundamentally supports it by having higher precedence than function calls. If the infix operands grow complex it can get hard to read without parens.

  if (function-call n x1 x2 x3) < 10
    (f n+1)
  # still works, but yuck..