Thread overview
User Stories: Funkwerk
Mar 14, 2018
Mike Parker
Mar 16, 2018
Rubn
Mar 17, 2018
bauss
Mar 17, 2018
Jonathan M Davis
Mar 17, 2018
bauss
Mar 17, 2018
Jonathan M Davis
March 14, 2018
The final post in the series on Funkwerk is the first in a new series of User Stories. Three Funkwerk developers share some of their enthusiasm about D. Michael Schnelle talks about the power of ranges, Ronny Spiegel tells us how generated code is better code, and Stefan Rohe shows off some of the company's community outreach.

Blog:
https://dlang.org/blog/2018/03/14/user-stories-funkwerk/


Reddit:
https://www.reddit.com/r/programming/comments/84dnxy/dlang_user_stories_developers_from_funkwerk/
March 16, 2018
On Wednesday, 14 March 2018 at 14:17:50 UTC, Mike Parker wrote:
> foreach(auto element: elements)

":" is C++ syntax


March 17, 2018
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)
March 17, 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

March 17, 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?
March 17, 2018
On Saturday, March 17, 2018 20:12:08 bauss via Digitalmars-d-announce wrote:
> 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?

AFAIK, it has always been illegal, and periodically, it's been brought up that it should be legal for consistency, but for better or worse, it hasn't been changed.

- Jonathan M Davis