Suggestion: Syntactic sugar for Exception handling in D2

Jarrett Billingsley jarrett.billingsley at gmail.com
Sun Jun 21 12:57:26 PDT 2009


On Sun, Jun 21, 2009 at 3:51 PM, Ulrik
Mikaelsson<ulrik.mikaelsson at gmail.com> wrote:
> I just remembered another tiny benefit of allowing this. Being a VCS-fascist, I really strive towards patches that are as readable as possible.
>
>>   * Makes the code slightly more readable, since the "exceptional" code-paths are clearly separated
>>   * Biases me as a programmer to think a little bit more of exactly what exceptions can be raised in a function, improving my code-quality.
>>   * When I'm about to write a try-clause, makes me think twice if the code could not be extracted as a separate method instead (if I can only figure a good name for it), also improving readability and code-structure.
> +   * Patches adding exception-handling will not change indentation of a potentially very large method, making it slightly easier to read.
>

Not to deflate you, but most respectable source diff tools I've seen
have an option to ignore whitespace/indentation changes :\



More information about the Digitalmars-d mailing list