Re:Parse, Don’t Validate
by cjfd on Friday November 08, 2019 @04:52AM
(#21481016)
This can go two ways. One can end up with lots of different types that do nothing but wrap a string. On the other hand I have also seen a float being used to represent a price. The correct way is somewhere in between those two extremes. If you have some logic specific to a value, by all means, make it a type but if there isn't it just ends up with lots of boilerplate.
[ Parent
| on HN ]
There are no comments on this comment yet.