![]() |
|
#5
|
|||||
|
Well again, not a C guy, so I can't comment on the performance specifics of try/catch vs. if/else in C. I'm almost certain that there is some sort of cost to try/catch, but I'm also a very strong believer in one of Donald Knuth's famous quotes:
Quote:
(As an aside, a very common misconception among programming learners is that your computer/compiler is the primary "reader" of your source code. This misconception isn't actually one at first, when you're just working on your own code and learning. However, in a professional environment your code gets read by one or more peer reviewers when you first check it in, then again by you or someone else in the future everytime a bug gets fixed or a new feature gets added that relates to that code. If you piss off the compiler with uncompilable code you can fix it in a few seconds, but if you piss off the humans with unreadable you can waste hours if not days of people's time.) As for: Quote:
__________________
Loramin Frostseer, Oracle of the Tribunal <Anonymous> and Fan of the "Where To Go For XP/For Treasure?" Guides Anyone can improve the wiki! If you are new to the Blue or Green servers, you can improve the wiki to earn a "welcome package" of platinum and/or gear! Send me a forum message for details. | ||||
|
Last edited by loramin; 08-07-2018 at 11:35 AM..
|
|
||||
|
|