#null-safety Clear
Tags #php #kotlin #bash #go #sql #rust #typescript #html #java #python #files #utils #strings #http #concurrency #async #json #arrays #security #types #crypto #database #dates #format
Java Optional — Stop Returning Null
`Optional<T>` makes "may be absent" part of the type signature so callers can't forget the null check. `map`, `orElse`, `ifPresent` chain naturally — no `if (x != null)` boilerplate.
Kotlin Nullable Types — String? and the ? Operator
Kotlin distinguishes `String` (never null) from `String?` (may be null) in the type system. The compiler refuses to compile code that could deref a possibly-null value — the famous "no more NullPointerException" feature.
Kotlin Safe Call Chain + Elvis Default
`?.` is the safe-call operator — short-circuits to `null` at the first null in a chain. Pair with `?:` (Elvis) for "this or a default". Replaces nested if-not-null ladders.