Arc Forumnew | comments | leaders | submit | lisper's commentslogin
4 points by lisper 4839 days ago | link | parent | on: Where are we going?

Not that I really want to flog this dead horse, but since you ask: my enthusiasm for Arc is dampened by the fact that it's a Lisp-1 with non-hygienic macros. This is not a problem as long as the code base and the user community is small, but the larger the code base gets the more of a problem it will be. By the time the code base is large enough for the problem to be evident it will be very painful to fix it.

IMHO of course. Paul sees things differently.


4 points by almkglor 4839 days ago | link

This is IMO true and has been of concern to me; I've tried to ameliorate this by adding packages and 'symeval to Arc-F, but I'm not 100% sure that those aren't just hacks to get around the weakness of the core design ^^


4 points by arco 4839 days ago | link

does your opinion come from experience? or it's just that you have a hunch in this direction?


6 points by lisper 4839 days ago | link

Neither. I've never done any large-scale coding in Scheme (I'm a Common Lisper) but it's more than just a hunch. The theory behind name capture is easy to understand. The only counter that I've heard is, "Well, it just doesn't seem to be a problem in practice." I believe that this is only because the Arc code and user base have not yet reached the scale where the problems manifest themselves.

But even if Paul is right and name capture is rarely if ever a problem in practice, punting on name capture seems to me fundamentally at odds with the stated goal of producing the 100-year language. At best it's an unnecessary burden on the programmer, and at worst it's a time bomb that could go off any time. Either way it doesn't make me optimistic that Arc is going to win in the long run.


> So does it really work?

It turns out that the current implementation has a serious bug, so at the moment the answer is no, it doesn't. But the situation appears to be salvageable.

> If this works then why did people both writing all those posts about hygiene?

Well, this is (a form of) hygiene. But it's not complete. As others have observed, it doesn't work for macros (though once the bug is fixed it will) and you still have to put in gensyms (a.k.a. uniqs) manually to avoid downward capture.


1 point by lisper 5085 days ago | link | parent | on: An arcish solution to name capture

Until the day you want to do this:

(mac1 ... (mac2 ...

and find that MAC1 has a name conflict with MAC2, and both MAC1 and MAC2 were written by someone else.


2 points by lisper 5085 days ago | link | parent | on: An arcish solution to name capture

> The basic issue I would have with this is that variable capture like this happens maybe in 1/1000 uses of macros (thought it's already happened once to me, so I agree with your concern is valid)

Have you written 1000 macros? If not I'd say you underestimate the odds. Also, whatever the odds are, they just get worse as the size of the code base increases.

> However, your solution would make 100% of macro definitions ungainly, which is too high a cost, IMHO.

But macros only make up a small percentage of typical code, so this might still be OK.

> The best solution I can think of is:

Two problems with this:

1. Issuing those warnings is not easy. It requires a code walker. If you're going to go to that much trouble you might as well implement real hygienic macros.

2. (only-top foo) seems even more ungainly to me than ^foo.

I personally don't think the ^foo idea is the perfect solution, but given that PG doesn't like hygiene or Lisp-2 it seems like a good alternative. Better than burying your head in the sand and hoping the problem doesn't happen IMHO.


3 points by lisper 5085 days ago | link | parent | on: An arcish solution to name capture

There are two name capture problems. Gensym solves the other one. :-)


And speaking as someone who is actually a Python fan, I agree: making indentation significant is a big mistake IMHO. Parens are a feature, not a bug.


2 points by lisper 5107 days ago | link | parent | on: Thoughts on arc (syntax)

I like FST (first) and RST (rest) with combinations keying on the first letter, e.g. ffrrst == caaddr