Re: OT (Was: Re: What's the proper way to use std.getopt?)

2017-12-11 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, December 11, 2017 15:38:44 H. S. Teoh via Digitalmars-d-learn wrote: > On Mon, Dec 11, 2017 at 11:35:53PM +, Seb via Digitalmars-d-learn > wrote: [...] > > > D style would be to use sth. like this (instead of try/catch): > > > > ``` > > scope(failure) { > > > > e.msg.writeln; > >

OT (Was: Re: What's the proper way to use std.getopt?)

2017-12-11 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Dec 11, 2017 at 11:35:53PM +, Seb via Digitalmars-d-learn wrote: [...] > D style would be to use sth. like this (instead of try/catch): > > ``` > scope(failure) { > e.msg.writeln; > 1.exit; > } > ``` Frankly, much as I love UFCS syntax, I think this is taking it a little too far.