Hacker News new | ask | show | jobs
by psnj 6064 days ago
> Checking parameters in every method (especially an OO system) is a sure way to have poor performance.

This seems overly general to me. I'm not sure it's a "sure way to have poor performance." It seems to me that (for example) a null-check is pretty fast.

> Normal methods should just work find even if a parameter is NULL.

What's a "normal method"? And if the business logic of the method requires a particular parameter to be non-null (or has some other constraint), what should happen when a null parameter is passed-in (by a test or otherwise)?