On 9/7/2016 4:05 PM, deadalnix wrote:
And with a default constructor, there's all that code added to deal with the
constructor failing and throwing.
One needs to construct anyway.

For constructor failures, one has little choice but to throw an exception. Despite all the great work at making exceptions zero-cost for the non-throwing path, they aren't zero-cost.

With a 'builder()', there are options other than throwing an exception, if performance is the top priority.

Reply via email to