- From: edbaafi via GitHub <sysbot+gh@w3.org>
- Date: Mon, 24 Feb 2025 17:34:58 +0000
- To: public-css-archive@w3.org
@mindplay-dk Sorry the "something better" was just referring to a different set of keywords (while names are mostly subjective - "better" here refers to terms that lack the baggage of well known definitions for the target audience such as `if` or `select`). I was highlighting that ternary made sense (although also not as accessible of a name for non-programmers) before the choice was made to allow for easy switching (what you're calling "pattern matching"). Scroll up to the OP and you'll see the `Grammar 1` vs. `Grammar 2` question. What I'm saying is `ternary()` matches 100% with Grammar 1 (having to nest the `if()`), but not Grammar 2 (allowing for multiple conditions within one `if()`) that was what was decided on. @Loirooriol thanks for pointing that out about rust! It's an expression driven language so that makes a lot of sense in that context. I still think we could pick a name that doesn't mean a specific, conflicting thing to so many developers (especially wrt the only language shipped with the browser). I was only pointing out that it felt wrong to me and trying to make sense of why. If we don't care about the expression vs statement question there is still the fact that we are adding multiple conditions to a single `if` expression. Does rust or any other modern language do that with `if`? And then does it matter when JavaScript doesn't and that is the most relevant language for this set of developers. -- GitHub Notification of comment by edbaafi Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10064#issuecomment-2679188443 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 24 February 2025 17:34:59 UTC