4 ms·
I don’t find guards “crude”, they’re actually quite elegant. At least coming from the Ruby world.
by cpursley 3y ago
I don’t find guards “crude”, they’re actually quite elegant. At least coming from the Ruby world.
- sodapopcan 3y agoThey were saying guards are a crude form of type-checking, not intrinsically crude. Really they are a perfectly regular form of type hinting--as is pattern matching in function heads--when being used for no other purpose than to ensure the correct type is passed at runtime.