On 10/06/2020 16:13, G. P. B. wrote:
Greetings PHP internals,
Kalle Sommer Nielsen and myself are proposing to rename the
T_PAAMAYIM_NEKUDOTAYIM
token into the already existing T_DOUBLE_COLON alias,
T_PAAMAYIM_NEKUDOTAYIM would then become an alias to T_DOUBLE_COLON.
The RFC is located here: https://wiki.php.net/rfc/rename-double-colon-token
Although this token is a nod to the valuable contributions made by the
Isrealie community we believe this token is rather confusing for newcomers.
Moreso, as PHP is for many people their first programming language,
they may not have some of the habits like googling errors when
they are stuck, which leads to a frustrating experience.
As we believe PHP still has many years of existence we think it is time
to rename this token.
This is backwards compatible with PHP 7 and 5.
This RFC does not lay out a plan for deprecating T_PAAMAYIM_NEKUDOTAYIM
and leaves this as a future scope.
As the matter on hand is a relatively straight forward yes/no vote we expect
it to be held after the minimum 2 week discussion period.
Best regards
George Peter Banyard
Either as an alternative, or as an "as well as" option: I think a better
way to improve parser error messages would be to include the point in
the line where the parser error occurred. This would additionally help
where a token appears multiple times on the same line.
This could be either as:
a) Character count (at line 456, character 23)
b) Quote either the remainder or the parsed section on the line (MySQL
quotes the remainder, for example)
c) Quote the whole line with an indicator where the error occurred. I'm
not sure what the best way to do this would be - generically this could
be encapsulated in several values: The line content, token start
character count, token length / end character count
A case where I can see this still not helping is cases where the parse
error can occur several lines after the actual error (or even at the end
of the file) due to things like missing quotes / braces.
AllenJB
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php