Post #2476229
2026-05-02 15:30 UTC
@grant_h@mastodon.social
Yeah, that's been the design pattern I've seen and used: default to None and test for it, if you're doing anything anything fancier than a Bool or an Int
Replies (1)
-
@grant_h@mastodon.social 2026-05-02 17:09
@MrBerard@mastodon.acm.org Yes. The trick is to _never_ use a mutable as a default, unless you're in the business of memoising something. That's the gotcha - the default at-load evaluation is not what I think most programmers expect.