Arc Forumnew | comments | leaders | submit | krustt_ar's commentslogin
4 points by krustt_ar 6119 days ago | link | parent | on: The proposed : syntax

The last syntax in the example is amazingly clear to read for me (a non-lisp programmer that knows how lisp works).

-----

3 points by reitzensteinm 6119 days ago | link

I agree. It removes a lot of redundant characters. There are quite a few errors in the example (unless I'm missing something), but it sure looks a lot better, and the correct syntax would remove just as many (just be formatted a little differently).

Now this'll get me stoned, but what about combining it with a bracket pair that switches on infix? Here's the canonical factorial example in 3 views, implicit brackets on indentation and infix, implicit brackets on indentation, and standard Arc:

http://pastebin.com/f7a944cd5

The infix looks nicer (to me, but I'm also a non-lisp programmer that understands how lisp works), but probably isn't worth the cost of adding a whole new language element, not to mention precidence rules into the language itself. Representing longer math though it would probably get more and more succinct. I have to say, I'm really taken with the whole implicit brackets thing. The strong Python feel helps with readability (I use Python day to day).

-----