Thread overview
[Issue 18759] feature request: blocks
Apr 13, 2018
Simen Kjaeraas
Dec 17, 2022
Iain Buclaw
April 13, 2018
https://issues.dlang.org/show_bug.cgi?id=18759

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

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

--- Comment #1 from Simen Kjaeraas <simen.kjaras@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)

--
April 18, 2018
https://issues.dlang.org/show_bug.cgi?id=18759

hsteoh@quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hsteoh@quickfur.ath.cx

--- Comment #2 from hsteoh@quickfur.ath.cx ---
This definitely needs to be discussed in the forum, and will need a DIP if there's any hope of actually implementing it.

(And great idea BTW; I came up with a similar idea a long time ago but didn't pursue it beyond a cursory forum discussion. Perhaps you'll have better luck this time.)

--
April 18, 2018
https://issues.dlang.org/show_bug.cgi?id=18759

hsteoh@quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|x86_64                      |All
                 OS|Linux                       |All

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=18759

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P4

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

--- Comment #3 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/19423

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--