Hacker News new | ask | show | jobs
by SjorsVG 1665 days ago
Runtime type checking.. What a dreadful idea
2 comments

Most places I see runtime type checking, is when checking the type of incoming data, aka, Json, or if the function is a library and you are helping the callers use the correct types. Go/java, etc all do this by default. You read an int from a in memory untyped object, and you get an error if it's not actually an int.
Much worse than static type checking. But infinitely better than no type checking.