3 ms·
> (Note: For brevity, error handling is largely omitted from programs shown.) I found this article interesting but to be honest I hate it when people do this.
by KirinDave 9y ago
> (Note: For brevity, error handling is largely omitted from programs shown.)
I found this article interesting but to be honest I hate it when people do this. Usually it is the real-world considerations and error handling that cause the code to cease being an elegant demo and look more like the same stuff everyone else writes.
- qznc 9y agoWell, the real world code is also linked at the start of the article: https://github.com/eBay/tsv-utils-dlang https://github.com/eBay/tsv-utils-dlang
- agumonkey 9y agoYeah code only dealing with elegant cases is elegant. News at 20. Sometimes I wonder if software should error first, then when you bounded the failure space, you iterate on the success space as you see fit.
- alexeldeib 9y agoIn a way, isn't this how software works? The problem being that an unaccounted for error might make your program exit, or produce an incorrect result, etc. I like your idea conceptually but struggling to imagine what working on software would like in a practical sense.
- AceJohnny2 9y agoYou've just defined Test-Driven-Development.
- WalterBright 9y agoGiven that one normally throws an exception when encountering a runtime error in D, it often is not necessary to have specific runtime error handling code.