Right that depends if you subscribe to the belief that null means the absence of a value `Option<T>` or does it mean the zero value `T`.
2 karma · joined April 25, 2024
Go: *string
Java: Option<String> or @Nullable String
Rust: Option<String>
TypeScript: string | undefined (or string | null) String foo = null;
String bar = "";
foo.equals(bar) --> true
This works well provided the data type has a sensible zero value like collection typesEDIT: I'm blocked from posting so I won't be responding further, thank you for discussion.
I've been using sqlc, sqlx, pgtyped, & kysely and I found they have ORM-like productivity with full type-safety but they don't bring the baggage of leaky abstractions.
Unfortunately I don't know if there are Ruby or Python equivalents yet.