Elektrine lite

← Feed

@treyhunner@mastodon.social

Post #4350725

2026-08-03 04:22 UTC

I find that I appreciate truthiness when it feels like we're asking "does this exist". I think of this question in the case of the hours example above but not for the remainder of division by 2. If you avoid truthiness for numbers altogether, I wouldn't blame you. I rely on truthiness checks heavily for checking non-emptiness and non-noneness, but I rarely use them for checking non-zeroness. It CAN be handy, but I do sometimes find it less readable. 🧵 (2/2)

Replies (1)

  • @psukys@river.group.lt 2026-08-03 09:41

    @treyhunner@mastodon.social there's always additional mental load to check what the corresponding type is for truthiness checks

    Open ##4350724