this post was submitted on 29 Jun 2024
886 points (94.7% liked)

Programmer Humor

32710 readers
1290 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] pivot_root 4 points 5 months ago (1 children)
[โ€“] [email protected] 2 points 5 months ago

Or just implement null as a separate type, as php does. Then you have to accept string | null (or its shorthand, ?string) if you want nulls.