On 21 July 2024 17:45:27 BST, Deleu <[email protected]> wrote:
>I don't agree with the sentiment of "given the 2 options
>available, we prefer the option where we know we are negatively impacting
>community members consuming token_get_all() in favor of protecting
>imaginary PHP users that would have been adventurous enough to make use of
>comments between yield
and from
."
I understand what you're saying, but I think there are more than two groups of people, and more
than two options:
As well as users who have already made use of the feature, we are implicitly talking about users who
will use it in future. If nobody ever wants to use it, then it makes no difference if we revert or
not, and no difference if CodeSniffer can support it or not. If they do want to use it, and we
revert, they suffer. If they want to use it, and use CodeSniffer, then they will suffer if
CodeSniffer decides it cannot be sensibly handled. Bob's proposed alternative implementation
*might* mean that these users get everything they want (if JRF and others say they can consume that
token stream).
On the other hand, Bob's proposal affects a different set of users: those whose code contains
"parse from" *without* extra comments, which will now emit two tokens instead of one. They
will suffer if tools are not updated to handle this change.
Reverting now, and *later* implementing the feature a different way will impact multiple of these
groups, just at different times.
Regards,
Rowan Tommins
[IMSoP]