Suggestion: Syntactic sugar for Exception handling in D2

Ulrik Mikaelsson ulrik.mikaelsson at gmail.com
Tue Jun 23 16:06:01 PDT 2009


> If it's braces you're concerned with, D doesn't actually require them
> on try/catch/finally like many other languages:
As I said, the braces is just the small obvious benefit. The larger benefit IMHO is the less obvious shift in how you think about exceptions, but I'm not sure that argument is worth anything if you haven't experienced it personally. 

Writing braces is even done automatically by some editors, but thinking of exception handling as a natural part of a method (just like in/out contracts are part of the method, and unittests/invariants are a natural part of a class).

It's about how the language encourages the developer to think about certain aspects, and that is of course almost impossible to really assess the value of.



More information about the Digitalmars-d mailing list