2 ms·
That's another reason I like (good) static types, it's a bunch of compiler-included documentation and testing that I don't need to write!
by twoquestions 8y ago
That's another reason I like (good) static types, it's a bunch of compiler-included documentation and testing that I don't need to write!
- erik_seaberg 8y agoAlso a good reason for defining and using the most specific subtypes possible. In some domains, "this arg is a string" is useless for validation or documentation because everything is a string. Is it really a URL? a UUID? a serialized timestamp? a property name?
- woolvalley 8y agoThat's called something being stringly typed, and it's a code smell. You make URL classes, UUID classes, timestamp classes, enums, etc to replace the strings.