Arc Forumnew | comments | leaders | submitlogin
4 points by zck 2763 days ago | link | parent

Interesting! My first reaction is that I would very much dislike reading code with this (I've never gotten used to Arc's`(a:b c)` syntax).

But it's cool to cross-pollinate languages!



4 points by rocketnia 2763 days ago | link

I understand, I think. I think it adds regularity, which is a benefit and drawback, like it is with Lisp's parentheses. But I got used to Arc's (a:b c) at a time when I didn't need a strong reason; the fact that someone put it in a language was enough to convince me it was worth a try, and by "try" I mean using it everywhere I could. :)

This Parendown syntax tackles the a lot of the same needs as quotation sugars, right-associative infix operators, multi-branch conditionals, and imperative blocks. Those individualized pleasantries no longer need to exist as much, but some of what was pleasant about them might slip through the cracks and be neglected entirely by the more regulated approach. Lisp's parentheses didn't solve the things this does, and this doesn't solve some things that other syntaxes do (such as left-associative infix operators, perhaps).

Programming this way in Cene for a while, one thing I keep wanting to reintroduce is quotation sugar. But that's probably unrelated; Cene has a more elaborate syntax for quotation to help with programs that involve several nested quotes, and since I only actually use it in shallow cases, it's a bit hard to explain why I've made it so elaborate. :-p A sugar would brush some of that complexity under the rug until it's useful.

-----

4 points by prestonbriggs 2752 days ago | link

I quite like ':' for function composition, especially in situations like this

  (map odd:car '((1 2) (4 5) (7 9)))
where you're composing a new function to pass along as an argument.

-----

3 points by rocketnia 2751 days ago | link

Well, that's a use case Arc supports and Parendown doesn't. :)

Depending on the example, Parendown can get close:

  (map odd #/map car '#/(1 2) (4 5) (7 9))

-----