jeff 👨💻@programming.dev to Programmer Humor@programming.devEnglish · 1 year ago0 vs null vs undefined - explained with toilet paperi.stack.imgur.comimagemessage-square39fedilinkarrow-up1562arrow-down114
arrow-up1548arrow-down1image0 vs null vs undefined - explained with toilet paperi.stack.imgur.comjeff 👨💻@programming.dev to Programmer Humor@programming.devEnglish · 1 year agomessage-square39fedilink
minus-squarelabsin@sh.itjust.workslinkfedilinkEnglisharrow-up2·1 year agoI like the pattern a lot more. It makes you just initialize the value and only keep it ‘nullable’ for where it’s needed and then you need to check. Even .net implemented it (but a bit more awkward)
minus-squareCanadaPlus@lemmy.sdf.orglinkfedilinkEnglisharrow-up1·1 year agoYup. Programmers are really stupid, if the compiler forces us to explicitly handle weird situations that’s a feature.
I like the pattern a lot more. It makes you just initialize the value and only keep it ‘nullable’ for where it’s needed and then you need to check. Even .net implemented it (but a bit more awkward)
Yup. Programmers are really stupid, if the compiler forces us to explicitly handle weird situations that’s a feature.