Arc Forumnew | comments | leaders | submit | randallsquared's commentslogin
2 points by randallsquared 6318 days ago | link | parent | on: Why Arc when we have newLISP?

I don't believe newLISP has real lexical scoping, which is far more fundamental than support for Unicode.

-----

1 point by Forrest 6318 days ago | link

So what? NewLISP's contexts are certainly real enough if you have to have it. Frankly I don't find lexical scoping all that necessary as I keep my functions and parameter lists short and sweet and never have any particular problem debugging my programs. If I absolutely need a lexical closure on variables I just use a newLISP context.

-----

2 points by randallsquared 6318 days ago | link

Great. I hope you continue to do well.

-----

3 points by randallsquared 6319 days ago | link | parent | on: Optional Parenthesis

For people who aren't used to lisp,

def f (x y) let z (* x y) * (- z x) (- z y)

is awful, especially since they'll automatically group "(* x y) * (- z x)" as an expression. :) But maybe your indentation fixed that.

-----

2 points by sjs 6317 days ago | link

I'm almost certain that Eli meant to write:

    def f (x y)
      let z (* x y)
        * (- z x) (- z y)

-----

1 point by EliAndrewC 6317 days ago | link

Exactly so, thank you. I've since Googled to find how to do code formatting, so I shouldn't have this problem in the future. Thanks for posting the correct code.

-----

2 points by randallsquared 6319 days ago | link | parent | on: Unhygienic macros?

It seems to me that a solution that preserves easy macros is to have the mac macro look for some syntax that is used to insert w/uniq calls.

-----

1 point by zunz 6319 days ago | link

Sure, you could indeed use markup to make the burden of uniq-ing lower - that mitigates the impact of the design decision, but doesn't address the underlying issue.

Fundamentally, hygienic macro systems assume that capture is unintentional by default (although you can ask for it), rather than assuming that capture is the default and you have to ask to avoid it.

When writing macros, which is the more common default? Since arc appears to be using macros extensively in it's implementation, perhaps it was found that capture was actually more common but that implies a language implementation issue has been 'promoted' to a language design issue. Maybe I shouldn't see those as seperate - this is LISP after all :-)

Hygiene is one of those things that doesn't bite you when the code-base (or more importantly, the idea-space) is small. But as the system gets bigger (and I'm assuming we all want arc to be good for big problems), you can't keep it all in your head anymore and spending many hours debugging a complex application to find a simple macro capture oversight bit you is not fun.

-----

5 points by randallsquared 6319 days ago | link | parent | on: [... _ ...] is fishy

Arc has gensyms, using uniq. Or am I missing your meaning?

-----

1 point by cje 6319 days ago | link

Gensyms yes, but they're actually interned symbols of the form "gs231". See arc0/ac.scm:641. "currently rather a joke"

-----

2 points by randallsquared 6319 days ago | link

That's an implementation detail. ;)

-----