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

2018-02-11 Thread Wes
Hello PHPeople, I present to you... the shortest RFC ever. https://wiki.php.net/rfc/deprecate-backtick-operator Let me know what you think!

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

2018-02-11 Thread Stanislav Malyshev
Hi! > 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 think we need a bit more explanation that that. Why would we want to use backticks for Unicode strings? Why we need to deprecate existing f

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

2018-02-11 Thread Wes
Hi Stas thanks for the feedback. I've added more info for more clarity. It's absolutely impossible to treat notices as errors in PHP, so I assume everybody thinks the same. If someone converts notices to ErrorExceptions or something, it's their fault. A notice in tests is exactly what a deprecatio

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

2018-02-11 Thread Stanislav Malyshev
Hi! > It's absolutely impossible to treat notices as errors in PHP, so I > assume everybody thinks the same. If someone converts notices to > ErrorExceptions or something, it's their fault. > A notice in tests is exactly what a deprecation is supposed to do, force > people to update their code. I

[PHP-DEV] Proposal to run all tests with and without strict_types enabled

2018-02-11 Thread Pedro Lacerda
Hi PHP developers, I'm new to the PHP development world and enjoying to learn the internals of this popular language. I'm also very interested in testing and typing. Most if not all of the few tests in ext/ with strict_types=1 are related to bugs. Function argument parsing is done explicitly (eg

[PHP-DEV] Re: Proposal to run all tests with and without strict_types enabled

2018-02-11 Thread Christoph M. Becker
On 12.02.2018 at 00:03, Pedro Lacerda wrote: > So a new function check_strict_types() was needed to expose > ZEND_ARG_USES_STRICT_TYPES() enabling .phpt tests to check for it in the > --SKIPIF-- section if needed. Umm, I wonder whether a magic constant (say, `__STRICT_TYPES__`) would be more appr

[PHP-DEV] Re: Proposal to run all tests with and without strict_types enabled

2018-02-11 Thread Pedro Lacerda
I'll check magic constants and give you a response. The skip message is up to the test developer, however at first I'll probably need to change all relevant tests and your message seems appropriated to put. 2018-02-11 20:34 GMT-03:00 Christoph M. Becker : > On 12.02.2018 at 00:03, Pedro Lacerda

[PHP-DEV] Re: Proposal to run all tests with and without strict_types enabled

2018-02-11 Thread Pedro Lacerda
I agree with `__STRICT_TYPES__`, give me some time so I can try reimplement `check_strict_types()` as a magic constant. Maybe the idiom `if (expr) die("reason");` is a bit verbose or cluttered for a single expression `SKIPIF` section. A `die_if(expr, reason)` function could be available in that co

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

2018-02-11 Thread Michael Morris
On Sun, Feb 11, 2018 at 1:41 PM, 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! > -1, not that my vote matters, but huge -1. Nothing of value is gained by doing this. If there is so

Re: [PHP-DEV] Proposal to run all tests with and without strict_types enabled

2018-02-11 Thread Stanislav Malyshev
Hi! > My proposal is to run all tests with and without strict_types, skipping if > necessary, and increasing the code coverage. Depending of you overral > reception I'll create an RFC for it. I am not sure what would be the advantage of this. Beyond testing strict_types functionality itself (whic

Re: [PHP-DEV] Proposal to run all tests with and without strict_types enabled

2018-02-11 Thread Pedro Lacerda
> > 2018-02-11 20:34 GMT-03:00 Christoph M. Becker : >> >>> Umm, I wonder whether a magic constant (say, `__STRICT_TYPES__`) would >>> be more appropriate. >> >> Implement `__STRICT_TYPES__` was a breeze, very hackable codebase. A magic constant indeed sounds more appropriate. Hi Stanislav, 20

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

2018-02-11 Thread Thomas Hruska
On 2/11/2018 9:45 PM, Michael Morris wrote: If we are going to go about removing stupid operators in PHP, the current use of @ as an error suppression operator is much higher on the list since encourages people to write bad code by sweeping problems under the rug Or people don't like how PHP curr