News for hackers. Stuff that matters.

beluchin

Re:Don't Be Afraid of Types on Sunday March 23, 2025 @10:16AM (#43453089)
Types are sets e.g. the Integer type is the set of all the integer values.
Re:Don't Be Afraid of Types on Sunday March 23, 2025 @10:05AM (#43453006)
> Static classes are fine for those functions if ...

> there is only one reasonable implementation of the function

this. In the absence of polymorphism, a static function is just fine. I am in the phase of avoiding object notation in preference of functional notation whenever possible. I leave OO notation to cases where, for example, there is polymorphism as the functional wrapper will add little to no value.