Welcome! Log In Create A New Profile

Advanced

[PHP-DEV][RFC][DISCUSSION] Deprecate the backtick operator

Posted by Wes 
Christoph M. Becker
Re: [PHP-DEV][RFC][DISCUSSION] Deprecate the backtick operator
February 14, 2018 12:20AM
On 13.02.2018 at 23:41, Wes wrote:

> Consider that people dislike writing \strlen(), they will for sure dislike
> writing u"string". Hence reassigning backticks to unicode strings seemed to
> me like a possibility.

Okay. However, in my opinion, it is a bad idea to suggest a deprecation
of a feature that *might* be used differently sometime in the future,
because if it will not, the deprecation doesn't make any sense. So,
YAGNI applies somehow.

Actually, for me the only valid argument to deprecate the backtick
operator is "because it is a shady way to execute a rare and dangerous
operation". I, personally, would make that the main reason for the
deprecation proposal, and would move the other arguments to the "future
scope" section.

--
Christoph M. Becker

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Stanislav Malyshev
Re: [PHP-DEV][RFC][DISCUSSION] Deprecate the backtick operator
February 14, 2018 12:30AM
Hi!

> Actually, for me the only valid argument to deprecate the backtick
> operator is "because it is a shady way to execute a rare and dangerous
> operation". I, personally, would make that the main reason for the
> deprecation proposal, and would move the other arguments to the "future
> scope" section.

I don't think it is "shady" - it's a well-known syntax, and while shell
execution can indeed be dangerous in some scenarios, it is commonly used
in cli applications, and is not that rare there. I don't see a point in
deprecating it - it doesn't improve anything that I can see, only makes
extra work for people that are using it.

--
Stas Malyshev
smalyshev@gmail.com

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Markus Fischer
Re: [PHP-DEV][RFC][DISCUSSION] Deprecate the backtick operator
February 14, 2018 12:30AM
On 2018-02-11 20:41, Wes wrote:
> Hello PHPeople, I present to you... the shortest RFC ever.
>
> https://wiki.php.net/rfc/deprecate-backtick-operator
>
> Let me know what you think!
>

I don't have much of an opinion yet on the issue (observing the
arguments in the discussion so far), but one thing which stuck out for
me from one other recently announced RFCs [1] was the additional thought
of automating the code change via migrations tools, etc.

No one likes to do things manually and getting support for code fixers
could be of help here.

cheers,
- Markus

[1] https://wiki.php.net/rfc/fallback-to-root-scope-deprecation

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Sorry, only registered users may post in this forum.

Click here to login