tc39/proposal-do-expressions
View on GitHub ↗ ★ 1,194 HTML
Proposal for `do` expressions
23 mentions on Hacker News by 21 people: 2 stories, 21 comments · first 2017-10-24 · latest 2025-12-20
20082026
-
https://github.com/tc39/proposal-do-expressions (Not to be confused with do notation)
comment by pwdisswordfishy · 2025-12-20 · in Rust's Block Pattern -
For “everything is an expression” https://github.com/tc39/proposal-do-expressions may be of interest, though discussion seems to have paused.
comment by btown · 2024-10-22 · in Civet: A Superset of TypeScript -
…not pretty though, and I think the do expressions proposal would rid my codebases of this pattern: https://github.com/tc39/proposal-do-expressions
comment by throwitaway1123 · 2024-05-20 · in The problem with new URL(), and how URL.parse() fixes that -
…pattern matching/switch expressions They're still waiting on the do expression proposal for that ( https://github.com/tc39/proposal-do-expressions ), which has been in the bikeshedding stage for the past five years.
comment by crooked-v · 2023-08-18 · in TypeScript is surprisingly ok for compilers -
…proposal[1] is pretty much this (but it’s only stage 1 so who knows when/if it’ll land). 1: https://github.com/tc39/proposal-do-expressions
comment by eyelidlessness · 2023-02-27 · in CoffeeScript for TypeScript -
There's a dormant proposal about this: https://github.com/tc39/proposal-do-expressions
comment by indeyets · 2023-01-25 · in Using {blocks} in Rust and Go for fun and profit -
…there is a proposal ("do expressions") to allow this: const a = do { if (b) { 5 } else { 10 } }; https://github.com/tc39/proposal-do-expressions
comment by a_humean · 2023-01-25 · in Using {blocks} in Rust and Go for fun and profit -
…the last statement. There's a proposal for precisely that. Unfortunately, only Stage 1 though. https://github.com/tc39/proposal-do-expressions
comment by TheAngush · 2023-01-20 · in Pipe Operator (|>) For JavaScript -
For reference. Pattern matching: https://github.com/tc39/proposal-pattern-matching Do expression: https://github.com/tc39/proposal-do-expressions Pipe operator: https://github.com/tc39/proposal-pipeline-operator
comment by gherkinnn · 2022-10-04 · in The TC39 Process -
…to it: More hands-on/direct: https://github.com/tc39/proposal-pattern-matching More indirect: https://github.com/tc39/proposal-do-expressions > list comprehensions There are several libraries with strong Iterator support today that while…
comment by WorldMaker · 2022-07-28 · in HypeScript: Simplified TypeScript type system in TypeScript's own type system -
…years, which addresses this (though it is more verbose). I hope it will be accepted some day. [0] https://github.com/tc39/proposal-do-expressions
comment by molf · 2022-03-09 · in Advice on JSX Conditionals -
https://github.com/tc39/proposal-do-expressions Allows you to contain temporary variables to where they are needed, rather than having them remain active through the remainder of the current scope. You could do that with immediately…
comment by mschuetz · 2021-12-13 · in Deno Joins TC39 -
…proposal is a good example of that. Edit: forgot to link to the issue tracker I referenced above https://github.com/tc39/proposal-do-expressions/issues
comment by spmurrayzzz · 2021-12-13 · in Deno Joins TC39 -
…to operate on JSX. There's the do-expression proposal to achieve what you want in a sane way: https://github.com/tc39/proposal-do-expressions
comment by zodiakzz · 2021-10-19 · in A proposal for adding a pipe operator to JavaScript -
…that (because it's not as easy as just making `const x = for(let i of foo) { yield i; };` parse.) https://github.com/tc39/proposal-do-expressions https://babeljs.io/docs/en/babel-plugin-proposal-do-expressi...
comment by svieira · 2020-12-17 · in A case study on strict null checks -
That may be a nice addition to the "do expression" proposal for javascript: https://github.com/tc39/proposal-do-expressions let x = do { let tmp = f(); tmp * tmp + 1 }; Unfortunately it seems like the proposal doesn't get much attention.
comment by mschuetz · 2020-03-06 · in JavaScript variables: var and let and const -
…function expressions. A compact syntax for achieving this is the "do expression": https://github.com/tc39/proposal-do-expressions
comment by lioeters · 2019-07-28 · in JavaScript pattern that changed everything (for me) Kristijan Fištrek -
maybe do-expression proposal could help https://github.com/tc39/proposal-do-expressions
comment by ducaale · 2019-07-02 · in Svelte is the most beautiful web framework I've seen -
▲ 2
ECMAScript proposal for expression-oriented stylestory by Avi-D-coder · 2019-06-16 · 0 comments
-
Your wish can come true. Take a look at this stage 1 of the TC39 proposal. https://github.com/tc39/proposal-do-expressions
comment by Avi-D-coder · 2019-06-16 · in Comparing the Same Project in Rust, Haskell, C++, Python, Scala and OCaml -
"do" expressions have been proposed as well: https://github.com/tc39/proposal-do-expressions Babel supports it if you want to live on the bleeding edge: https://babeljs.io/docs/plugins/transform-do-expressions/ It would be kind of neat if…
comment by tlrobinson · 2018-04-25 · in JavaScript Pattern Matching Proposal -
>do-expressions already have a proposal For those who are curious, it's this one: https://github.com/tc39/proposal-do-expressions .
comment by networked · 2018-02-24 · in Escaping Hell with Monads (2017) -
▲ 1
ECMAScript proposal: do expressionsstory by adrianbordinc · 2017-10-24 · 0 comments