|
|
|
|
|
by nostalgeek
2874 days ago
|
|
If only there were some features in some computer languages or type systems that allowed to eliminate 99% of these kind of errors AT COMPILE TIME, making these kind of libraries redundant... but Go is so simple "you don't need all that" because sophisticated type systems "are just too hard", just do it all at runtime instead... |
|
But the other validations are more about contracts. Preconditions, to be precise. Yes, I know that a sufficiently advanced type system (dependent types?) could encode those in the function signature, but I am not entirely sure if the technology is already there.