|
|
|
|
|
by abqexpert
2033 days ago
|
|
It would be nice if C++ could really settle on one single error handling system like this. I know the contracts proposals have been shot down several times, but those I think would help a lot. People will only really code defensively if there is a some gain. Having the compiler enforce and use contracts for optimization would be the only way to ensure adoption. If people thought they could get a 5% speed boost, they would annotate their code with more of their assumptions. |
|
Compilers are often surprisingly bad at using much of such information effectively. Probably they will get better at it, but slowly.