On Thursday, 19 July 2012 at 14:51:59 UTC, Timon Gehr wrote:
On another note, (copied from wikipedia)

foreach(item; set) {
// do something to item
}

what's with the lax syntax being allowed?

s/lax/to the point/

Shouldn't it be at least specified "auto item"?


Why on earth would that be the case?

I'm sorry I don't mean to be a criticizer, but it seems to me that D is
trying to be a dynamic-like compiled language way too hard.

It's just syntax. Eliminating syntax noise is fine. Code should look
like what it does.

Additionally, allowing to omit auto is actually consistent with the rest of the language, which also allows you to not explicitly write it if the code doesn't become ambiguous (for example, you don't need to do "immutable auto").

David

Reply via email to