Suggestion: Syntactic sugar for Exception handling in D2

Jarrett Billingsley jarrett.billingsley at gmail.com
Sun Jun 21 12:52:10 PDT 2009


On Sun, Jun 21, 2009 at 3:48 PM, Ulrik
Mikaelsson<ulrik.mikaelsson at gmail.com> wrote:
> To be honest, while the only obvious benefit is shorting down the number of braces slightly, the real benefit I experienced from practicing it in Ruby were a slight change in how I actually think about exception handling.

If it's braces you're concerned with, D doesn't actually require them
on try/catch/finally like many other languages:

try
    doSomething(input)
catch(Exception e)
    handleError(e);



More information about the Digitalmars-d mailing list