Syntax features
- Definition
- Basic features to get things done

Features
Conditionals (if
, else
, switch
) (All major languages
) Basic decision-making structures to control flow based on conditions.
Loops (for
, while
, do...while
) (C
, C++
, Java
, Python
, JavaScript
, Go
, Rust
) Repetition constructs to execute code multiple times.
Pattern Matching (Haskell
, Scala
, Rust
, F#
, Elixir
, OCaml
) A mechanism for branching logic based on structural patterns.
Destructuring (JavaScript
, Python
, Rust
, Elixir
) Binding parts of a structure (array, object, tuple) to individual variables.
List Comprehensions (Python
, Haskell
, Elixir
, Scala
) Concise syntax for generating new lists by transforming existing ones.
Optional Chaining (JavaScript
, TypeScript
, Swift
, C#
) Access properties/methods safely on potentially null/undefined objects.
Ternary Operator (C
, Java
, JavaScript
, Python
, C++
) Short syntax for conditional expressions: condition ? expr1 : expr2
.
Guards (Haskell
, Elixir
, F#
, Scala
) Expressions used to provide additional conditions in function definitions or pattern matches.
Null-Coalescing Operator (C#
, JavaScript
, TypeScript
, Swift
) Provides a fallback value when an expression evaluates to null.
Switch Expressions (Java
, Kotlin
, C#
, Swift
) Switch/case expressions that return values, not just execute logic.