De ce que je sais, les exceptions ont été conçues pour faciliter la gestion des erreurs, quelles qu'elles soient.
Non, elles sont faites pour gérer les cas exceptionnels. C'est marqué dessus.
quick summary for why, generally, it's an anti-pattern:
- Exceptions are, in essence, sophisticated GOTO statements
- Programming with exceptions therefore leads to more difficult to read, and understand code
- Most languages have existing control structures designed to solve your problems without the use of exceptions
- Arguments for efficiency tend to be moot for modern compilers, which tend to optimize with the assumption that exceptions are not used for control flow.
[^] # Re: De l’utilité des exceptions.
Posté par xcomcmdr . En réponse à la dépêche SDL ou SFML ? Ne choisissez plus, prenez Gamedev Framework (gf). Évalué à 6.
Non, elles sont faites pour gérer les cas exceptionnels. C'est marqué dessus.
http://programmers.stackexchange.com/questions/189222/are-exceptions-as-control-flow-considered-a-serious-antipattern-if-so-why
"Quand certains râlent contre systemd, d'autres s'attaquent aux vrais problèmes." (merci Sinma !)