philnash@programming.dev to JavaScript@programming.devEnglish · 1 year agoStop nesting ternaries in JavaScriptwww.sonarsource.comexternal-linkmessage-square29fedilinkarrow-up141arrow-down110
arrow-up131arrow-down1external-linkStop nesting ternaries in JavaScriptwww.sonarsource.comphilnash@programming.dev to JavaScript@programming.devEnglish · 1 year agomessage-square29fedilink
minus-squarespartanatreyu@programming.devlinkfedilinkarrow-up8·11 months agoPretty sure they meant match as in pattern matching, not switch as in switch/case/break. You can see the proposal here: https://github.com/tc39/proposal-pattern-matching
minus-squareCameronDev@programming.devlinkfedilinkarrow-up2·11 months agoYour probably right, that looks quite desirable.
minus-squaresnowe@programming.devlinkfedilinkarrow-up1·11 months agothey also said switch expressions, which indicates they want the switch statement to be settable directly to a variable with whatever the return type of the switch is.
Pretty sure they meant
match
as in pattern matching, notswitch
as in switch/case/break.You can see the proposal here: https://github.com/tc39/proposal-pattern-matching
Your probably right, that looks quite desirable.
they also said switch
expressions
, which indicates they want the switch statement to be settable directly to a variable with whatever the return type of the switch is.