2 ms·
So I can either throw an exception and take a speed hit in my performance critical code or I can remove a possible value from my map?
by gravypod 10y ago
So I can either throw an exception and take a speed hit in my performance critical code or I can remove a possible value from my map?
- devishard 10y agoIt's not "removing a possible value from your map", it's having your type system explicitly check that you're handling the edge case at compile time. This works in practice in a wide variety of languages.