foreach

via Digitalmars-d digitalmars-d at puremagic.com
Fri Jun 13 15:34:09 PDT 2014


On Friday, 13 June 2014 at 21:41:43 UTC, Jonathan M Davis via 
Digitalmars-d wrote:
> The very idea of a loop without a condition seems very, very 
> wrong to me.

I like Rust's "loop". :3 I'm not sure of the exact stats, but a 
ton of my non-D loops are infinite, with or without breaks, like 
with lockless queues in concurrency (poll elements until null) 
and in network code (loop until crash).
Despite the shorter notation with for (;;), all of them are while 
(true). Probably code ocd.


On Friday, 13 June 2014 at 22:21:15 UTC, Meta wrote:
> It's a joke, though I suppose not a very good one. If 1 == 1 
> doesn't indicate a condition that should never be false to you, 
> then you're bad at math.

Imagine each infinite loop requiring a unique equation, where the 
right and left sides must be different before evaluation. Now you 
can yell at people for not getting that, I dunno, some complex 
expression is 42 or -1 or whatever.


More information about the Digitalmars-d mailing list