You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, I've thought the same about modify and friends, and will probably do it.
I actually find the for, doseq etc. let syntax kind of gross, tbh; anyway, you don't need to use the admittedly kind of conspicuous let-syntax that mdo supports; you could also write:
But I admit that it may be found desirable to have an inline form such as already exists (or as you suggest). But I still don't really like the form you suggest (no offense), partly because the rest of the syntax diverges from customary Lisp style anyway (with, I think, good reason). But it occurred to me recently that there's no reason for the supporting parsers that mdo exploits to live in a separate package, so I'll probably move them out of there and into this one, making it easier to support alternate styles---it's really quite simple.
(Basically, I don't like having :let be a keyword, and I don't like the use of a binding vector there where it looks, to me, to be floating around not really connected to anything. The let x = (+ (* x x) (* y y)) syntax is clearer to me both as regards what the assignee is and what the expression is,and that the whole thing is not happening in a "normal" execution context---whereas we'd normally expecting the binding only to be visible in what the let form encloses, here the let form (before the transformation) doesn't enclose anything. Maybe it's because the whole mdo syntax apes Haskell's do syntax anyway, but it looks nicer to me. As I said, you don't have to use it at all.)
The mdo syntax seems like alien in clojure world. especially for the
let
form. What if we change it to:The :let form looks for consistent with
for
,doseq
.Also for
modify
function, is better to enable(modify [f & params])
style?The text was updated successfully, but these errors were encountered: