this post was submitted on 29 Jun 2024
904 points (95.0% liked)

Programmer Humor

37663 readers
280 users here now

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

Rules:

founded 6 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] pivot_root@lemmy.world 4 points 1 year ago (1 children)
[โ€“] rikudou 1 points 1 year 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.