Arc Forumnew | comments | leaders | submitlogin
3 points by rocketnia 4877 days ago | link | parent

I said I'd respond to the Semi-Arc thread two months ago ago. @_@ Now the thread's on the third page, and its comments are disabled, so I'm posting my response here in a new thread. (Submitting a discussion page as a link is probably really confusing, but oh well. ^_^;;; )

It took me this long to finally dust off my rough draft of this post and post it. It's not that impressive, but here it is:

---

After my comment at http://arclanguage.org/item?id=12553, I poked around to try to discover Semi-Arc's weaknesses.

I'm going to try out Semi-Arc right now. ^_^ I'm sure I'll have some error reports for you in a moment. Hopefully not too many! :-p

However, it turns out Semi-Arc has at least one difference that's too cool to remove, yet makes writing portable Arc code especially tricky:

  arc> (+ '(a b c) '(d e f)).2
  c
  arc> (read "(+ '(a b c) '(d e f)).2")
  ((+ '(a b c) '(d e f)) 2)
I like it, but I worry whether it's a bit inconsistent. Here are a few cases worth double-checking. See if any surprise you:

  arc> (readall "car.'(a b)")
  ((car '(a b)))
  arc> (readall "get.0.'(a b)")
  ((get 0.0) '(a b))
  arc> (let foo '(a b) get.0.foo)
  *** void variable: 0
    0: 0
    1: (get 0)
    2: ((get 0) foo)
  arc> (let foo '((a)) foo.0.0)
  *** not applicable: ((a))
    0: (#0:0:foo 0.0)
  arc> (read "'a.b")
  '(a b)
  arc> (read "'a.b.c")
  '((a b) c)
  arc> (read "'a:b")
  '(compose a b)
  arc> (read "'a:b.c")
  ('(compose a b) c)
  arc> 'a:b.0
  compose
Here's the Arc 3.1 output for comparison:

  arc> (readall "car.'(a b)")
  (car. (quote (a b)))
  arc> (readall "get.0.'(a b)")
  (get.0. (quote (a b)))
  arc> (let foo '(a b) get.0.foo)
  a
  arc> (let foo '((a)) foo.0.0)
  a
  arc> (read "'a.b")
  (quote a.b)
  arc> (read "'a.b.c")
  (quote a.b.c)
  arc> (read "'a:b")
  (quote a:b)
  arc> (read "'a:b.c")
  (quote a:b.c)
  arc> 'a:b.0
  a:b.0
Partly because of this difference, I don't expect to write any code that's portable between Arc and Semi-Arc. There are other important differences too, like the fact that in Semi-Arc, ((compose a b) c) isn't equivalent to (a (b c)) when 'a or 'b is a macro.

So I can't come up with test cases that Semi-Arc needs to pass. It's not the same language as Arc 3.1, and I think it's up to you, suzuki, to decide what to do with it.