Arc Forumnew | comments | leaders | submitlogin
7 points by kostas 6158 days ago | link | parent

PG,

Grepping the source, the x.y and x!y syntax doesn't seem to be used.

Have you tried them out on the news.yc code? What's your initial feel in terms of code compression?



6 points by pg 6158 days ago | link

I've been trying this syntax on example programs for several weeks. Maybe months, actually. It doesn't yield startling results in compression if you count x.y as 3 nodes, but it does make programs easier to read, particularly when you use it for structure access.

-----

9 points by curi 6157 days ago | link

why not change x!y to x.'y ? seems a bit easier to remember, saves ! for something else. dunno if there's a parsing problem with it.

-----

7 points by pg 6157 days ago | link

Hmm, never thought of that. I'll consider it.

-----

3 points by mattjones 6157 days ago | link

What if x.y!z expanded to ((x y) z)? Then if x were '(1 2 (3 4) 5), x.2!1 would give you 4. If (x 1 3) did work like cut, then you could do x.1.3!1!1, which would also give 4 in this case.

-----