in reply to Re^4: Pivoting 2 dimensional array refs
in thread Transposing 2 dimensional arrays

I think you're right. Certainly additional whitespace isn't inherently virtuous ;).

I spent some idle cycles trying to figure out what I don't like about the $a = (b) ? c : d; notation, while being fine with the same construct in the 'open' case and as strange as it may sound I think it's that the former doesn't read in natural language very well, being "assign lvalue if condition from value otherwise from alternate." But open is "open file or die" which flows much easier when reading down the code.

Me

Replies are listed 'Best First'.
Re^6: Pivoting 2 dimensional array refs
by John M. Dlugosz (Monsignor) on May 18, 2011 at 19:02 UTC
    In that case, it's just a matter of getting used to the idiom, or learning to read code more fluently. Code is not English, any more than the pattern of pieces on a chessboard or an engineering blueprint. But you learn how to arrange the information in your mind and then how to extract that from the presented form.

    The mental things to take in are:

    1. assign to $a
    2. different things depending on b
    3. the specific things
    So, the presented order does match how you grasp it, even though it's not a natural order in an English sentence.