Consensus on goto's into catch blocks

Iain Buclaw ibuclaw at ubuntu.com
Fri Jun 14 15:05:30 PDT 2013


On 14 June 2013 19:44, Walter Bright <newshound2 at digitalmars.com> wrote:
> On 6/13/2013 2:08 PM, monarch_dodra wrote:
>>
>> Well, I guess as long as the compiler (optionally) supports skipping over
>> initialization it means it can handle the magic required to maintain the
>> stack
>> pointer, so that shouldn't really be a problem.
>
>
> Sometimes it is handy to skip initializations, and I get annoyed with g++
> barfs on me doing that. That said, such should only be allowed in @system
> code.
>

IMO, the only annoying ones in C++ are where switch statements jumping
to case labels crosses initialisation of variables, but D solves that
by having cases in their own scope. :o)

Any other type of skipped initialisation is an error that should
definitely have all alarm bells ringing.

--
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';


More information about the Digitalmars-d mailing list