User Stories: Funkwerk

bauss jj_1337 at live.dk
Sat Mar 17 20:12:08 UTC 2018


On Saturday, 17 March 2018 at 19:54:07 UTC, Jonathan M Davis 
wrote:
> On Saturday, March 17, 2018 12:48:07 bauss via 
> Digitalmars-d-announce wrote:
>> On Friday, 16 March 2018 at 19:42:11 UTC, Rubn wrote:
>> > On Wednesday, 14 March 2018 at 14:17:50 UTC, Mike Parker 
>> > wrote:
>> >> foreach(auto element: elements)
>> >
>> > ":" is C++ syntax
>>
>> Also "auto" can be omitted.
>>
>> foreach (element; elements)
>
> Not only can be. It must be. auto is not legal in a foreach 
> loop in D, which is arguably a bit inconsistent, but for better 
> or worse, that's the way it is.
>
> - Jonathan M Davis

Ahh, I didn't know it had become illegal or at least I think I 
remember foreach loops accepting auto in the past, but that's 
probably years ago or maybe I remember wrong and it has always 
been illegal?


More information about the Digitalmars-d-announce mailing list