Re:"Parse, don't validate" through the years with C++
by alpinisme on Thursday April 30, 2026 @06:57AM
(#47960702)
It’s a contrived example. And I have to assume the author intended it to be contrived given that he also put an upper bound at 1999 in an article written in 2026 in an industry that skews young.
But the pattern applies regardless of the validation logic.
Re:"Parse, don't validate" through the years with C++
by Neywiny on Thursday April 30, 2026 @07:04AM
(#47960751)
Or what if they were born after 1999?
It's just a toy example not a production ready birthday validation library.
Re:"Parse, don't validate" through the years with C++
by psychoslave on Thursday April 30, 2026 @07:41AM
(#47961015)
Assuming it is necessarily known which is the birth year of anyone assumed to have been in existence is already a big hypothesis if we go in that direction.
What about everyone born before 1900?