Arc Forumnew | comments | leaders | submitlogin
6 points by oconnor0 4235 days ago | link | parent

Is there a reason you limit ! and . to work only for symbols and integers?


7 points by pg 4235 days ago | link

The plan with intrasymbol syntax is (a) not to break traditional Lisp read and (b) to expand in place. If you have those two constraints, instead of just saying "ok, put any syntax anywhere," you can introduce syntax into Lisp without getting too unLispy.

-----

1 point by oconnor0 4233 days ago | link

Right. Maybe it's the traditional Lisp read that's the main factor here because it seems that you could expand in place without issue given even arbitrary expressions.

If a.b expands to (a b) then (f v w).(g x y) would just expand to ((f x y) (g x y)). At first glance, that definitely appears to be a cool way to grab just one of the results from a function return (ala (f x y).2).

Hmm, on the down side, you could have statements like (or worse):

    (bst-find tree 45 f<).(if (< 10 42) (/ 4 3)
                              (> 4 2)   x
                                        'r)
That being said, having to change read to get this to work may affect far too much and make arc too ugly.

-----

3 points by treef 4235 days ago | link

i think the code will look rather harry if they are allowed to be every where.

-----