On Friday, 24 July 2015 at 10:15:36 UTC, Walter Bright wrote:
Nope. As opposed to:

    int r;
    if (y == 10) {
            while (i--)
                z += call(i);
            r = z;
    } else {
            switch (x) {
                case 6:
                    r = foo();
                    break;
                default:
                    r = y;
                    break;
            }
    }

    x = 45 + r + tan(z);

My point was that you can effectively do the ugly thing already in a worse way. I didn't say there aren't neater ways of getting the same functionality in this particular case. Doesn't it demonstrate that expressions returning values can make a given piece of code tidier?

Reply via email to