Arc Forumnew | comments | leaders | submitlogin
3 points by waterhouse 5212 days ago | link | parent

> But, let's suppose that we decided to make = sequential... like it is right now. Now you need to make a new macro (like pset) to describe parallelness. On the other hand, if = were parallel, it's trivial to use `do` to make it sequential: no need to write a new macro.

Minor objection here: No. I could call it trivial to do the work of describing parallel assignments:

  (with (new-a b new-b (+ b a))
    (= a new-a b new-b))
And, in fact, I would feel the need to write a new macro to express sequential =. "Gar dammit I hate writing "do" and "=" a bunch of times." To me, both things are trivial, and I just might be more annoyed by the latter.


1 point by Pauan 5212 days ago | link

Alright, fair enough. But what if there was a built-in macro like =* that could be defined like so:

  (mac =* args
    `(do ,@(map (fn ((n v))
                  `(= ,n ,v))
                (pair args))))

  (macex1 '(=* a b c d e f)) -> (do (= a b) (= c d) (= e f))
Voila, now both cases are handled in a nice and easy fashion.

-----