-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A big let and with change #898
Conversation
LGTM, I like it. |
👎 I approve of removing the extra As for |
I'll redo this PR, and instead of completely changing |
Updated, now it doesn't change |
What happens if |
The old version and the new both do the same thing: hope it does something sane-ish. I'll add a test case, though. |
Actually, there already is such a test: |
(A thought prompted by #907—) as long as we're breaking the world in order to favor Clojure-style brace-minimizing implicit pairings, we should probably do |
I don't think it's worth removing brackets from Thus: (cond
[(= foo bar) (do-this) (do-that)]
[(= hue hue) (do-something-else) (do-that-too)]) If we drop the brackets, we lose the ability to do an implicit |
We could support both with a variadic if, see #830. |
Ping @hylang/core. |
This changes let to use a flat list of symbol-value pairs instead of a vector of vectors. One side effect is that (let [[a 1] z]) is not expressible now, and one will explicitly need to set a nil value for z, such as: (let [a 1 z nil]). Closes #713. Signed-off-by: Gergely Nagy <[email protected]>
This changes with syntax from (with [[x (expr)] (expr)] ...) to (with [x (expr) (expr)] ...). Should have no ill side effects apart from the syntax change. Closes #852. Signed-off-by: Gergely Nagy <[email protected]>
This drops the outer brackets from
let
andwith
, but does NOT change let behaviour anymore. That'll be another change, if at all.See #713 and #852.
(Thanks for the reviews so far, the scope of this change was drastically reduced.)