`for (let a of b) { fn(a, y, do {if (cond) continue; z;}); }` = sadness. 2/2
-
-
Replying to @bakkoting @wycats
Worse: `for (x; do { if(cond) continue; a; }; y) { ... }`. What's the use case for control flow, to justify language complexity? 3/2
1 reply 0 retweets 0 likes -
Replying to @bakkoting
it might actually be harder to disallow in terms of complexity, but also, returning seems quite useful.
1 reply 0 retweets 0 likes -
Replying to @wycats
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?
1 reply 0 retweets 0 likes -
Replying to @bakkoting
have you ever tried to write: x || throw new Error("...")? I have, many times.
1 reply 0 retweets 0 likes -
Replying to @wycats
I'm fine with throw! Arbitrary exprs, iifes already can throw. Concerned about return, break, continue. Don't see use case, either.
2 replies 0 retweets 0 likes -
-
Replying to @wycats
"can throw", not, "can contain a ThrowStatement". I'm fine with / happy about `do { throw new Error(); }`. But `return`?
1 reply 0 retweets 0 likes -
Replying to @bakkoting
in Ruby I write code like this plenty: let result = if http://x.zero ? return last else recur(x) end Problem?
1 reply 0 retweets 0 likes -
Replying to @wycats
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
1 reply 0 retweets 0 likes
sorry -- let me try to be less terse soon. Heading in to work.
-
-
Replying to @wycats
Yeah, this medium isn't great for non-terseness. IRC (jslang or wherever) works too, if you'd prefer.
0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
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.