4 ms·
I do not think so. If you check the example schema, it is very hard to understand it. What does ':lat' mean? is it a string or a number? What does '!b' mean, ca
by eventreduce 6y ago
I do not think so.
If you check the example schema, it is very hard to understand it. What does ':lat' mean? is it a string or a number?
What does '!b' mean, can it only be false?
- philliphaydon 6y agoIf you read the whole example: lat = custom validator b = shorthand for boolean (as is s for string) ! = optional So for me reading the whole example its very easy to understand and digest.
- eventreduce 6y agoYes, reading the docs explains what these keywords mean. But by just looking at the schema it is impossible to understand what that is. And if you check the definition of clean code which is something like "intuitive understandable" then it comes clear that this is not clean.
- philliphaydon 6y agoAh I see where you’re coming from. Good point.
- catlifeonmars 6y agoThe “!” for optional is the only thing that confused me. Why not “?” for optional?
- yusufnb 6y agoUpdated to ? in 1.0.3
- philliphaydon 6y agoNice that makes more sense!