Re: [csswg-drafts] [css-conditional-4] Rename @when to @if (#6684)

> CSS should actively steer clear of familiar control flow structure syntax because it is not an imperative language.
> 
> "If this is true **do** this thing" vs "When this is true use these rules"
> 
> So a vote here from me for `@when` over `@if`

Control flow is not a characteristic of imperative languages. Many declarative languages have control flow structures, and as I mentioned in my original post, tend to call conditionals `if`: 

> There is precedent for using `if` for conditionals in almost every language that includes conditional statements (and not just imperative languages as [has been erroneously mentioned](https://github.com/w3ctag/design-principles/issues/335#issuecomment-924428863)). For example, [spreadsheets](https://support.google.com/docs/answer/3093364?hl=en-GB) and all flavors of SQL ([SQL Server](https://www.sqlservertutorial.net/sql-server-stored-procedures/sql-server-if-else/), [MySQL](https://dev.mysql.com/doc/refman/8.0/en/if.html), even [SQLite](https://www.sqlitetutorial.net/sqlite-functions/sqlite-iif/)), [Lisp](https://www.tutorialspoint.com/lisp/lisp_if_construct.htm), [Haskell](https://wiki.haskell.org/If-then-else), [Erlang](https://www.tutorialspoint.com/erlang/erlang_if_statement.htm), [XSLT](https://www.tutorialspoint.com/xslt/xslt_if.htm), all of which are considered declarative.

-- 
GitHub Notification of comment by LeaVerou
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6684#issuecomment-927303195 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Sunday, 26 September 2021 13:03:35 UTC