Arc Forumnew | comments | leaders | submitlogin
2 points by raymyers 6120 days ago | link | parent

True. Anarki-only macros should probably be banished to the `lib' folder, so they have to be (require)'d before they start modify your code.


2 points by nex3 6120 days ago | link

I'm not so sure about this. I think changes of the filling-up-namespace sort are reasonable, for the same reason being a Lisp-1 is reasonable: conflicts happen rarely in practice.

A better solution would be to try to ensure that only generally useful macros are added to arc.arc, and that they have names that are unlikely to be used as local variables. Or even better would be to make local variables shadow macros.

Consider this, though: "help" is defined as a macro. Some of the REPL-var code needs macros. The drop-into-scheme operator is a macro. I don't think we want to make people load a library file to use these.

I see the compatibility rule as more of a guideline - try not to break the functionality of stuff that already exists. But I don't think it should limit experimentation and exploration, including exploration of what's useful to have in arc.arc.

-----

2 points by raymyers 6120 days ago | link

OK, I'll backpedal a bit here. The last thing I want is to have to require "lib/help.arc" :). It should be easy to find out what macros have been added though -- as much for curiosity as for compatibility. I'll try and whip up a script tonight, unless someone beats me to it.

-----

4 points by raymyers 6119 days ago | link

Script complete. It crawls `arc.arc' and every file loaded by `libs.arc'. So now, if you type the following,

    (require "lib/new-macros.arc")
    (new-macros)
... you will discover that the non-Arc1 macros in Anarki are currently:

    ($ % % %% %%% breakable defsop help make-br-fn or= redef)

-----

1 point by nex3 6119 days ago | link

Most excellent. It's great to see how easy it is to analyze Arc code using Arc.

Anyway, of those, the only one I see potentially conflicting with a variable name is "breakable", and that seems quite unlikely.

-----

2 points by akkartik 6119 days ago | link

Great thread to see how y'all converged on a design decision after some back and forth.

-----