Arc Forumnew | comments | leaders | submitlogin
4 points by bogomipz 5935 days ago | link | parent

Problem is, you're adding a coupling between the function and the name. No such coupling exists in any lisp that I'm aware of. Conceptually, in Scheme and Arc

  (def foo (x) (prn "it's " x))
is the same as

  (= foo (fn (x) (prn "it's " x)))
i.e. all functions are anonymous from their own pov.

Also, variable lookup is going to be very slow. What you're saying is that the following will make lookup of any name starting with "a" return the same value;

  (= /a.*/ 42)
I'm sure lots of interesting tricks can be done with this, but I'm afraid it adds a lot of complexity only to make very confusing functions possible.


1 point by bramsundar 5935 days ago | link

I think that there are some nice possibilities lurking in this idea. Perhaps there could be a macro defined that modifies def to use this functionality (kind of like pm:def).

-----

2 points by bogomipz 5935 days ago | link

You can't make a macro create an infinite set of global bindings.

-----