On 09/10/2021 10:41, Mike Schinkel wrote:
Besides, your alternative is a bit reductio ad absurdum.


I'm not sure what you mean by this. Dan's example is the first three lines of yours, written as currently valid PHP, and seems a reasonable comparison of how much the new syntax would save.

If anything, it's your choice of example that exaggerates things - it's not that frequent that you have such a long list of methods, all returning the same type, and all with a hard-coded return value.


rather than modify the language.
You state this without justification that it has been established that changing 
the language is a bad thing. If that were true, why does the RFC process even 
exist as in most cases RFCs are passed to change the language?


That's not what Dan meant at all; he said that changing (or simply ignoring) coding standards is easier than changing the language.

There's also the very real possibility of having to do both: the new syntax is added, but the authors of your favoured coding standard decide to discourage its use, and you're back at square one.


All that said, you're not the first to point out that PHP's method syntax is more verbose than many; so far though, nobody has managed to get enough consensus behind any alternative, as with Larry's RFC that you mentioned.


Regards,

--
Rowan Tommins
[IMSoP]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to