I should know better than to come back at you on this and just allow the visually obvious to win the day.
(Especially as I don't really believe that you really believe half of what you've said in this thread.)
But there are some things you said I just can't let pass.
You've required an extra level of indentation. That adds complexity.
No. It doesn't. Whitespace "adds complexity" is so obviously wrong. The "complexity" doesn't change one jot.
The additional whitespace adds clarity. Better yet, it removes obfuscation.
The reason we use indentation is to promote clarity; and improve readability. For the same reasons and goals (and achievements) as using paragraphs and sentences and bulleted lists in formal writing.
Reading the code your (well, my) mind goes, "Okay, I'm getting a list of items by dereferencing some... unknown thing, so we'll come back to that... Oh, I take the current user, get their account, get the prior order for that account, get the item codes for that order. Now, where was I? Oh yes, 4 operations ago I was supposed to remember a dereference. The '}' isn't followed by anything and um, oh yeah, we started with '@', so that means I'm turning a ref to an array into a simple list." Yeah, I find that way more complicated than what I'd have to think with ->@*.
I'd suggest that you're getting old, but i doubt your older than me, so that doesn't cut it.
More likely, you are simple overstating the task. You are not a compiler. You do not need to process the entire statement to understand it.
Its populating an array by dereferencing (a reference!) the return of a function call. (Full stop.)
The function call returning that reference is .... (Full stop.)
To understand just what kind of dereference is being requested, I have to line up two characters ...
Again, no you don't. Again, you're overstating this.
There's one bit -- made obvious by the "extra" level of indentation:
-- that chains through several method to finally arrive at what we want: a reference.$user->GetAccount()->GetPriorOrder()->GetShippingAddress()
Once we've got that reference, we dereference it and extract 2 fields from the hash. Clear as day.
In reply to Re^6: use feature 'postderef'; # Postfix Dereference Syntax is coming in 5.20 (complexity)
by BrowserUk
in thread use feature 'postderef'; # Postfix Dereference Syntax is coming in 5.20
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |