for in D versus C and C++

Denis Koroskin 2korden at gmail.com
Thu Mar 19 12:08:41 PDT 2009


On Thu, 19 Mar 2009 22:05:21 +0300, Walter Bright <newshound1 at digitalmars.com> wrote:

> Steve Teale wrote:
>> I just find this scary, because although it says at the top of the
>> page "most of this will be familiar to C/C++ programmers" this little
>> fact means I have to go through all of the familiar constructs with a
>> fine tooth comb.
>
> It shouldn't be scary, because the idea is if some common C struct is  
> not acceptable in D, one gets a decent compiler error message. A scary  
> thing would be if the code was silently accepted but did something  
> different.
>
>> Also, nobody is answering the question. I can work out the
>> alternatives, but I'd just prefer it if existing code worked. I used
>> to use the idiom I quote all the time.
>
> I'm not understanding your question, then.
>

I believe he is asking for a way to force that code to compile (a compiler switch or have it enabled by default).



More information about the Digitalmars-d mailing list