Arc Forumnew | comments | leaders | submitlogin
1 point by vladimir 5151 days ago | link | parent

If not ':' then '..' is also possibility, like (a 5..9), but to be honest i like your version, it's more Lispy. But maybe syntax '..' could improve readability? Compare:

(a b c) (a b..c)

You write (about ar) "Much of Arc remains unimplemented", so is it better to use mzsheme version for now?



1 point by Pauan 5151 days ago | link

"If not ':' then '..' is also possibility"

Nope, no can do. "." is used for ssyntax as well. To be specific, foo.bar is equivalent to (foo bar) Thus, setf would need to be a macro, or we'd need to give up on ssyntax. I like ssyntax, so I'd go the macro route, personally.

---

"You write (about ar) "Much of Arc remains unimplemented", so is it better to use mzsheme version for now?"

Oh, no! I've been using ar for quite some time now, it works beautifully. I think awwx is being silly when he says that "much of Arc" is unimplemented. It's mostly implemented, and the stuff that isn't implemented, I don't use, so I don't notice... I'm at the point where the idea of using Arc 3.1 is absurd: ar is definitely the way to go.

You can find ar here:

https://github.com/awwx/ar

My libraries are designed specifically to work only with ar, though some may work on Arc 3.1 with some tweaks... My apologies for the incredible number of files in the ar branch, there's not much I can do about that...

---

By the way, you shouldn't use my old branch. It's there for historical reasons, and so that I can pull in changes piece-meal into current ar. Using the latest version of ar (I give the link above, in this post) is the way to go. Sorry for the confusion.

-----

1 point by rocketnia 5151 days ago | link

"Nope, no can do. "." is used for ssyntax as well."

Even though . is used for ssyntax, .. isn't, at least in Arc 3.1. While (ssyntax 'a..b) returns t, ssexpanding anything with .. in it throws an error.

You've talked about classifying ssyntax as prefix, postfix, and infix before, so I suspect you'd want a..b to expand through (a .b) to (a (get b)). As for me, I think it's nicer to treat multiple-character sequences like .. as their own operators.

-----