None, lists, dictionaries, tuples, and sets. The difference is that every value has a compile-time type and every missing-value path is visible in that type.
Scalars
int is the source-level integer you reach for by default. Use explicit fixed-width integer types when storage layout, binary protocols, FFI, or dtype-sensitive work requires a specific representation: int8, int16, int32, int64, uint8, uint16, uint32, uint64, isize, and usize.
Optional Values
UseT | None when a value might be absent. Sifr requires you to check None before using the inner value.
Lists
Lists are ordered, mutable collections.mut.
Dictionaries
Dictionaries map keys to values. Lookup results are typed so a missing key cannot crash later.If you know Python, this is an intentional difference:
dict["missing"] returns None in Sifr instead of raising KeyError.Counter or deque, use Collections.
Tuples
Tuples group a fixed shape of values.Sets
Sifr’s set helpers live insifr.collections and return deduplicated list values. This keeps ownership straightforward while still giving you set operations.
Truthiness
Collections can be checked directly for emptiness.None handling when a value is optional.
Next Steps
Iteration
Learn loops, comprehensions, and safe iteration patterns.
Python Developer Guide
See why missing dictionary keys return
None instead of raising KeyError.Collections
Use
Counter, deque, and set helpers from sifr.collections.