Post-Penultimate Conditional Syntax
a day ago
- #Syntax Design
- #Conditionals
- #Programming Languages
- The article explores unifying boolean if/else conditionals and pattern matching statements in programming language syntax.
- It reviews prior attempts in OCaml and Rust, highlighting their limitations and strengths.
- The author introduces 'Ultimate Conditional Syntax' with 'is' and 'and' keywords for conditional binding and composition.
- A proposal for 'Post-Penultimate Conditional Syntax' extends this with 'or' patterns and exhaustiveness checks.
- Concerns include potential unsoundness similar to OCaml's when clauses and ergonomic verbosity compared to traditional match statements.