request switch statement with common block
Andre Artus
andre.artus at gmail.com
Mon Aug 5 22:13:59 PDT 2013
On Saturday, 3 August 2013 at 19:22:53 UTC, Walter Bright wrote:
> On 8/3/2013 12:00 PM, JS wrote:
>> What I really don't get it is why people think that just
>> because they won't use
>> such a feature then it must be useless to everyone else.
>
> You could provide supporting evidence by examining every use of
> switch in the dmd, phobos, and druntime source code, and see
> what percentage of those would benefit from your proposal.
>
> Consider, for example, the scope guard statement in D. It is
> extremely useful - but it is an unusual form (doesn't exist in
> other languages) and programmers just don't think in those
> terms. Andrei & I constantly have to work at 'selling' the
> benefits of it. It still hasn't really caught on.
The scope guard statement is my all-time favourite feature in D.
It's so much easier to reason about than several layers of
try/catch/finally.
A close second is the Contracts, especially as it can be applied
to interfaces. a huge win for service oriented programming.
More information about the Digitalmars-d
mailing list