User Stories: Funkwerk

Jonathan M Davis newsgroup.d at jmdavisprog.com
Sat Mar 17 19:54:07 UTC 2018


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



More information about the Digitalmars-d-announce mailing list