Re: [PHP-DEV] Internals "camps"

  107484
October 10, 2019 22:04 walterp@gmail.com (Walter Parker)
On Thu, Oct 10, 2019 at 1:27 PM Mark Randall <marandall@php.net> wrote:

> On 10/10/2019 20:59, Walter Parker wrote: > > They will either be stuck on an old version of PHP or have to pay to > update the code. > > If you're getting stuck on a island after being given 4 or 5 years > warning that the bridge to it will be closed, after being pointed to the > ferry, given free tickets to that ferry, and being told it will continue > to run long after, that's your own fault. > > > Ok, that's something I had not realized, you and the other supports of this RFC are offering to fix other people's PHP code for free. Given that,
I have far few objections to this RFC. That is what free tickets on the ferry means...
> > This pushes the > > costs on them to solve a an existing issue that 20 years after it was > > created and is now an issue because a new generation of coders, unaware > of > > history, find the existing syntax not to there taste/a poor design. > > > History does not mean it was a good idea at the time, and even if it > was, that doesn't mean it's a good idea now. Times move on. Your > argument could easily be reversed... > > Personal opinion.
> An old generation of coders, stuck in their ways, inflexible, preferring > what they know rather than changing with the times for the greater good. > > Personal opinion and maybe an insult.
> > > Why are > > we giving priority to people that haven't taken the time to educate > > themselves over people that did and used programming style that used to > > common? > > > We're assuming that in a general purpose programming languages, most > programmers expect a function call to look like a function call, and not > a string. > > Still looks like another opinion, but I can see where people get confused. You don't know the number of times I say backslash and people type /
instead of \. Personally I think using \ for namespaces in PHP was a horrible idea. Why did PHP use the character that almost all modern langues use for escape as a name separator. I know they used it because it was the best of the bad items available.
> We're assuming that people don't just go from never having touched PHP, > to expert level, knowing all its quirks and secrets, within a few hours. > > We're assuming that there's a heck of a lot more to stewardship of the > language than backwards compatibility. > > > > So let's look at it from the perspective of what we can do... > > We can either a) Find a way to reach out to every PHP programmer in the > world and let them know that there's these special operators that look > like a string, but actually aren't, and they do something that can be > really dangerous, and they'll probably never see it but god help them if > it's there and they miss it. > > or > > b) We add one line of code and warn people that we're eventually going > to remove a rarely used and poorly understood syntax, and people should > at some point in the next 4 or 5 migrate to the much more obvious > shell_exec. > > Still mostly personal opinion here. You have still not bought any facts or research other than your personal opinion and research that I assume you
did with your local working group.
> By writing the RFC, it's pretty obvious which one I think is the best > and most realistic course of action. > > That much is clear. What is not clear is how much that opinion is shared with the average programmer with a few years of experience. Most coding
syntax is poorly understood by the beginning programmer. For the beginning programmer, I think $username = `whoami` and $username = shell_exec("whoami") would be equally confusing because you would have explain what a shell was, what exec was, maybe even what a function was. For backtick, you would tell them if you want the output from a command you run on the command line, enclose the command in backticks (they look like this `) and it will give you that value. In the PHP documentation for shell_exec, it links to backtick. The backtick documentation linkes to shell_exec. If this truly is the problem that you say it is, there should be plenty of documentation online as to the issues that it has cause. Maybe you could post some of the better cases (as the the responsibility of the person suggesting the change to provide evidence that the change is a good idea).
> Mark Randall > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >
-- The greatest dangers to liberty lurk in insidious encroachment by men of zeal, well-meaning but without understanding. -- Justice Louis D. Brandeis