@5imian @AdamRackis I've wanted it for things like:
assert('…', do {
if (…) {
… ? x(a) : y(b)
} else if (…) {
} else {
}
});
places where ternaries "work" but get out of hand fast. /cc @littlecalculist
-
-
I see that, but I'm still not seeing the inherent value over a function, which you could also have used
-
it would have to be an IIFE, which is an annoying incantation
-
No he wants you to make a separate function declaration, and then call it. (I'd prefer the `do` solution)
@5imian@littlecalculist -
the separate function declaration is much longer and less self-contained (a value for me).
-
I want my assertions, for example, to be in one place, not scattered all over the place.
-
nice benefit: it's really easy to strip them all at once with a build tool.
-
What's wrong with variables before the assertion?
-
nothing is "wrong" just like nothing would be wrong with disallowing anonymous functions.
End of conversation
New conversation -
-
-
Is this expected to move to stage 1 sometime soon?
@littlecalculist -
next meeting, I hope!
End of conversation
New conversation -
-
-
IMHO `do` really shines in situations where you need temporary block-scoped variables, but
-
where an immediately-invoked arrow function would be overkill (i.e. no arguments needed)
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.