jeff 👨💻 to Programmer [email protected]English • 3 years ago0 vs null vs undefined - explained with toilet paperi.stack.imgur.comimagemessage-square37fedilinkarrow-up1467arrow-down115
arrow-up1452arrow-down1image0 vs null vs undefined - explained with toilet paperi.stack.imgur.comjeff 👨💻 to Programmer [email protected]English • 3 years agomessage-square37fedilink
minus-square@[email protected]linkfedilinkEnglish2•3 years 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-square@[email protected]linkfedilinkEnglish1•3 years 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.