Is old style compile-time foreach redundant?

H. S. Teoh hsteoh at quickfur.ath.cx
Mon Jan 8 14:27:12 UTC 2018


On Sun, Jan 07, 2018 at 10:39:19PM -0500, Steven Schveighoffer via Digitalmars-d-learn wrote:
> On 1/6/18 6:25 PM, Ali Çehreli wrote:
> > Is 'static foreach' sufficient for all needs or is there any value
> > for regular foreach over compile-time sequences?
> 
> If you use continues or breaks, then you need to switch to gotos if
> using static foreach, as it does not support them directly.
[...]

Are you sure?  I was under te impression that it does support continues
and breaks -- but only if they are labelled, because of a syntactic
ambiguity otherwise.


T

-- 
"Hi." "'Lo."


More information about the Digitalmars-d-learn mailing list