"Rowan Collins" wrote in message
news:f9001e2a-8f13-d4ba-f514-f18dc1e4f...@gmail.com...
On 28/09/2017 20:07, Levi Morrison wrote:
The brace style is concise, nicely delimits the
expression, and seems the clearest for me to read because the symbols
don't
dominate.
This is something that I tried to push for in previous discussions - I've
never liked the syntaxes where the expression floats away from the
operator, and you have to work out where it ends. The counter-argument I
got was that some people actually like writing things like this, although
I'm not entirely clear why:
fn($x) => fn($y) => in_array($x, $y)
Just because some people would like to write code like this does not make it
acceptable for the majority of the programming community. You should never
forget that the primary aim of a programmer is to write code which can be
read by a human, and only incidentally to be executed by a machine (H.
Abelson and G. Sussman in "The Structure and Interpretation of Computer
Programs", 1984).
Some people complain that PHP is too verbose, so they strive to replace long
words, or groups of words, with abbreviations or even symbols. This, IMHO,
converts a readable program into a bunch of hieroglyphics and should
therefore be avoided.
I think there should be a rule which states that if something can already be
done with 5 lines or less of userland code then it should not be built into
the core language as it would be adding unnecessary complications that would
only benefit a small minority of programmers but would be to the detriment
of the majority.
--
Tony Marston
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php