On Tue, Dec 17, 2013 at 8:11 AM, Rowan Collins <[email protected]>wrote:
> On 16/12/2013 23:35, Andrea Faulds wrote:
>
>>
>>
>> On 16/12/13 23:33, Tjerk Meesters wrote:
>>
>>>
>>> I would love to completely eradicate it, but I also realize that there's
>>> existing code using it, such as:
>>>
>>>
>> Before writing the -- support patch, I wrote a patch to remove ++
>> support. There were a few tests that relied on the feature which required
>> rewriting, so I'm quite worried about what'd happen if we removed it. Maybe
>> in 6.0?
>>
>>
> Genuine question: what is the actual case for removing the current
> operator in favour of a function? Is it to make a clearer separation
> between string and numeric operations? Or that it feels like a function
> should have been created rather than overloading the operator in the first
> place?
>
For the sake of clarity I should reiterate the purpose of my patch; it's to
disambiguate the behaviour of ++ across the different data types by
treating the operands as numbers; this also means deprecating the current
++ behaviour on strings and instead moving the functionality under "string
functions".
So to answer your question, a bit of both but - personally - more of the
latter.
> Regardless of deprecation period, this is one of those things that is
> quite hard to track down - you can't just grep your codebase for instances
> like you can with a function being removed.
Indeed, it has the potential of dragging on like the deprecation of
register_globals
or magic_quotes
did. Given the current state of error
logging, this probably remains the biggest risk.
>
> Regards,
>
> --
> Rowan Collins
> [IMSoP]
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
--
Tjerk