https://issues.dlang.org/show_bug.cgi?id=18759

Simen Kjaeraas <simen.kja...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |simen.kja...@gmail.com

--- Comment #1 from Simen Kjaeraas <simen.kja...@gmail.com> ---
I'd suggest posting this on the forum. You're gonna have to write a DIP for it
to actually be added to the language.

This definitely needs more detail about the behavior of 'break', 'continue' and
'return' - constructs that don't make sense in all possible use cases. There
should be a way to declare which of these are valid.

I'd also like to see more complete examples. While your 'indefinitely' example
is great, it does not show how to deal with arguments - multiple input,
multiple output, inference. For instance, what would myFoo look like in a case
like this:

myFoo (ref e, out int n, float f; a, b) {
    if (f < 1) continue;
    n = e * f;
    e++;
    if (f > 2) break;
    if (e == 14) return;
}

(feel free to use a completely different example, this is just to highlight the
different complications possible)

--

Reply via email to