foreach syntax
Jonathan M Davis
jmdavisProg at gmx.com
Fri Jun 29 12:44:12 PDT 2012
On Friday, June 29, 2012 18:16:23 Namespace wrote:
> > It is redundant.
>
> But informative.
It's very common in D to not put the type unless it's absolutely necessary
(e.g. use auto everywhere). This can be both good and bad for code readability
and maintenance, but it's particularly useful with generic code, which is
generally promoted quite heavily. So, I think that you'll find that most of the
people around here generally don't explicitly use the type unless they need to
(though there's always someone who's an exception).
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list