07.2 Types and generics
Nominal types, generics, references—without null or optional keyword fantasies."
Types and generics
Beskid types are nominal and static. The compiler is not impressed by your dynamic enlightenment phase.
Core ideas (v0.1 sketch)
Section titled “Core ideas (v0.1 sketch)”- Records, enums, contracts as declared types
- Generics on types and methods where the grammar allows
ref Tfor reference semantics per memory model—not nullable pointers- No
nullliteral, nooptionalkeyword—see Option
Generics
Section titled “Generics”Think List<T>, Map<K,V>, Option<T>—parameterized types must be explicit at boundaries; inference helpers exist but will not save you from ambiguous APIs (see type inference).
Method dispatch
Section titled “Method dispatch”Instance calls resolve per method dispatch rules—no null receivers; use Option<T> + match.
Decision tree
Section titled “Decision tree”flowchart TD Q[Need absence?] -->|yes| O[Option T] Q -->|failure| R[Result-shaped enum] Q -->|never| V[plain T or ref T]