Hello, folks! Newbie to D, have some questions!

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Feb 20 18:57:50 PST 2017


"H. S. Teoh via Digitalmars-d-learn" wrote:

> On Mon, Feb 20, 2017 at 05:39:30PM +0000, ketmar via 
> Digitalmars-d-learn wrote:
>>  foreach (auto n; arr)
>>
>> oops. good job, auto!
>
> Haha... in this case you want to actually just drop `auto` completely.
> :-D
>
> But yeah, there are some funny inconsistencies in what exactly `auto` is
> supposed to mean.  Hard to say whether this case should be considered a
> bug, though.  In any case, it's only a trivial one.
this issue (`auto` in `foreach`) is raising from time to time, so it is 
definitely a sign that something is wrong. but i won't go further, it 
was already beaten to death zillion times.


More information about the Digitalmars-d-learn mailing list