[Issue 3699] Feature Request: while-else

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Mar 19 05:36:19 PDT 2014


https://d.puremagic.com/issues/show_bug.cgi?id=3699


bearophile_hugs at eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |bearophile_hugs at eml.cc
         Resolution|WONTFIX                     |


--- Comment #9 from bearophile_hugs at eml.cc 2014-03-19 05:36:12 PDT ---
(In reply to comment #7)
> Four year old request.  Can be discussed further on NG if required.

There are bugs that sleep in bugzilla for years just because no one has time or
desire to fix them, but they are still valid. I have plenty of similar bugs in
bugzilla. So closing down an issue just for lack of fixes is not a good idea.

And a Python-like "else" clause of while/for/foreach is nice. You can replace
code like:

bool ok = true;
foreach (...) {
    ...
    if (cond) {
        ok = false;
        break;
    }
}
if (!ok) { ... }


With:

foreach (...) {
    ...
    if (cond)
        break;
} else { ... }


Reopened until we have a true decision.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list