Hacker News new | ask | show | jobs
by chii 3918 days ago
> Now, you have to look up the Builder's methods to make sure you've filled in all required fields.

the builder should fail with a good error message if there are required fields you didn't supply to the builder.

1 comments

This doesn't solve the problem where the parameters aren't checked at compile-time. Now, hopefully all your codepaths are tested so your builder doesn't throw exceptions in production.