Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jflwyasdf
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
jflwyasdf
2y ago
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.
▲
by
jflwyasdf
2y ago
This is how I would do it. Go: *string Java: Option<String> or @Nullable String Rust: Option<String> TypeScript: string | undefined (or string | null)
3.
▲
by
jflwyasdf
2y ago
null would just mean the zero value instead of the absence of a value String foo = null; String bar = ""; foo.equals(bar) --> true This works well provided the data type has a sensible zero value like collection ty
4.
▲
by
jflwyasdf
2y ago
Fortunately, Uber made tooling for languages with broken type systems * https://github.com/uber/NullAway * https://github.com/uber-go/nilaway
5.
▲
by
jflwyasdf
2y ago
Former ActiveRecord & Django ORM enjoyer here. 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. Unfortu
6.
▲
by
jflwyasdf
2y ago
Their username says it all: https://landscape.cncf.io/