Hacker News new | ask | show | jobs
by mrkeen 338 days ago
IOW return something for the caller to validate.
1 comments

"Parse, don't validate" is a catchy way of saying "Instead of mixing data validation and data processing, ensure clean separation by first parsing 'input data' into 'valid data', and then only process 'valid data'".

It doesn't mean you should completely eliminate `if` statements and error checking.