this makes me very happy. do-expressions could be one of the best features to come to JS since ES5:https://twitter.com/BrendanEich/status/808684436665602048 …
it might actually be harder to disallow in terms of complexity, but also, returning seems quite useful.
-
-
Harder on spec or implementors? Spec yes, but worth it I think. Doubt for implementors. What's the use case of returns in expr. pos?
-
have you ever tried to write: x || throw new Error("...")? I have, many times.
-
I'm fine with throw! Arbitrary exprs, iifes already can throw. Concerned about return, break, continue. Don't see use case, either.
-
"can throw", not, "can contain a ThrowStatement". I'm fine with / happy about `do { throw new Error(); }`. But `return`?
-
in Ruby I write code like this plenty: let result = if http://x.zero ? return last else recur(x) end Problem?
-
That gives 'error: void value expression', no? With good reason. Doesn't this express intent better? Or do I not understand intent?pic.twitter.com/8juX55TZKS
-
sorry -- let me try to be less terse soon. Heading in to work.
- 1 more reply
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.