Namespace:
A friend of mine ask me why D's foreach isn't like C#

In D you often omit the type:

foreach (val; arr) {

Using "in" is better for the human programmers. But D is largely designed to make D compilers too happy. I think Walter said that the semicolon was preferred because it simplifies the compiler/compilation a little.

Bye,
bearophile

Reply via email to