Arc Forumnew | comments | leaders | submitlogin
1 point by bogomipz 6124 days ago | link | parent

Doesn't that mean you have to do an assignment in the normal case as well?

  (= foo (use 'foo))


3 points by bramsundar 6123 days ago | link

I don't think so. Couldn't you just have use's macroexpansion add a global variable named foo?

-----

2 points by bogomipz 6123 days ago | link

Yes, I thought of that after I wrote the comment. Avoiding repetitions like this is exactly what macros are for. I guess I'm not used to thinking in lisp yet.

pau wants 'use to be a function, though, so there would have to be a separate macro, or the other way around, or something.

-----

2 points by almkglor 6123 days ago | link

  (def function-that-assigns-one-to-a-global-symbol-of-your-choice (s)
    (eval `(= ,s 1)))

-----