Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106441 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 65734 invoked from network); 8 Aug 2019 17:59:58 -0000 Received: from unknown (HELO mail-ua1-f44.google.com) (209.85.222.44) by pb1.pair.com with SMTP; 8 Aug 2019 17:59:58 -0000 Received: by mail-ua1-f44.google.com with SMTP id g11so9739446uak.0 for ; Thu, 08 Aug 2019 08:27:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Z7IB+ZZQBYTTeXjWOB1Pd3Nz6MJOHypi9bhFP2xVd7c=; b=pKKD27C2EchZZ4Ae8z98UpL1kxbId7awV6MBQh5Gfg83etMdXRstIo7rKxXa2oc+nq 3re+rNP7UibSNUr01O8LEKggf51mdlY8xIELTadibd7rMlbC291LjwVN//Yh2MoIjtau fwxGihgwv0dLXhG1sCKoffaM7hstymA+fOWFC72wltCSUzOokr8LKird8pJDSf41r55S blpVduCfSGq8AFcjf+jGZa90B8R9Ezo8wZoXhEaUcnGPDwCWYXz4n5du6fQ36N1vxUyM wq1EbKm4ltIcRGN/R0iSe9ein0yCsTDAzLj2iUcx93FGdRPFZjp014wM4+v2hmZuuv0i TUIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Z7IB+ZZQBYTTeXjWOB1Pd3Nz6MJOHypi9bhFP2xVd7c=; b=tgCac7BivnQf1sEoiotwwm7s8jbrDn4mx3syJNyzL1W9FbJf9dpBvNmEMbgovNBhTX pJ1084EwxZ9aSFy4AIuKdDsbHjR0CwklztX1fgA7ZgMpoeU0Lb7p6TUbY/TppjnTaa0Y y+aNJYR6SK3spFjOBGDzWL8RgUHqdQDIH5vWDBAB6u2WvpAitiA8uVh98HcrzhaKn0R/ uMhsfsz1Y37r/AV2i9X0x3ZW+j/i5RStYJ+xeKct9VlNl57haS2AsN7rouE+56WVMflF vJKZimAR97xauNjvgx9sp9oPAmwUhvpi1XdFqgLw89suDNni8ggNDRdEHk/t+8cjYfN1 gpSw== X-Gm-Message-State: APjAAAVXB13U/ivVbbkO0C6x400tSE/JO7Cq+3dLKZyjEiH0Np8trnyK wNB4MwDgmlhAh859YwiFAxIhbpg6gHMGrYJ7g+g= X-Google-Smtp-Source: APXvYqwe4Ldn0bBhrEpx9+iWJ71c+ifuIrWfv4DxX473plFXqiKLA5Ksq5gsyGDrn7beaQ+sk6p/selQwr7EelW2ubs= X-Received: by 2002:ab0:6896:: with SMTP id t22mr5332640uar.127.1565278028798; Thu, 08 Aug 2019 08:27:08 -0700 (PDT) MIME-Version: 1.0 References: <1759114.DMe9nKvMbn@mcmic-probook> <62c73b8f-df41-43c2-bb51-ceeaf607cacf@Spark> In-Reply-To: Date: Thu, 8 Aug 2019 11:26:57 -0400 Message-ID: To: Peter Kokot Cc: Zeev Suraski , Brent , Internals , =?UTF-8?Q?C=C3=B4me_Chilliet?= Content-Type: multipart/alternative; boundary="000000000000e1a44a058f9cb0c1" Subject: Re: [PHP-DEV] [RFC] [VOTE] Deprecate PHP's short open tags, again From: chasepeeler@gmail.com (Chase Peeler) --000000000000e1a44a058f9cb0c1 Content-Type: text/plain; charset="UTF-8" On Thu, Aug 8, 2019 at 10:42 AM Peter Kokot wrote: > Hello, > > On Thu, 8 Aug 2019 at 16:17, Chase Peeler wrote: > > > > On Thu, Aug 8, 2019 at 9:35 AM Zeev Suraski wrote: > > > > > On Thu, Aug 8, 2019 at 3:17 PM Brent wrote: > > > > > > > I asked similar questions on Twitter, where Zeev replied the > following: > > > > https://mobile.twitter.com/zeevs/status/1158688885658046464 > > > > > > > > > I want to add a bit of color to this tweet: > > > - Estimated # of developers using PHP is at around 10M. This is based > on > > > some extrapolation from an EDS report from ~8 years ago that estimated > that > > > number at >6M, and growth rates we've seen beforehand. > > > - Anecdotally, I've seen it used many times in non-distributable code > over > > > the years - a lot more frequently than once per 100 users. > > > - Even if just 1% of the userbase uses short tags, that's ~100K. We > can > > > call this one a guess, but I'd say it's an educated guess that there's > well > > > above 1% of the PHP userbase that uses short tags. > > > > > > It feels like much of the counter arguments are based on guesses > without > > > > any real data to point to. > > > > > > > > > I wouldn't say they're guesses, but extrapolations - for instance, the > fact > > > I'm aware of many PHP frameworks and apps, and am not aware of any > single > > > one that allows short tags - makes me feel fairly comfortable to make > the > > > statement that "virtually all frameworks and apps designed for public > > > consumption disallow short tags". I can't preclude the possibility > that > > > the fact that all of the apps and frameworks I'm aware of don't allow > short > > > tags is a remarkable coincidence - or that there are countless ones > I'm not > > > aware of that do allow short tags - but I think that my theory is a lot > > > more plausible. > > > > > > I work on an internal application. Even though portability is not a > > concern for anything we write, we haven't used short tags since it was > > rumored they were going to be removed in PHP 6 many years ago. That being > > said, this application has been in development since 2003. There is a > large > > amount of legacy code written before I even started here, not to mention > > plenty of horrible code written after I did start in 2005 (this was my > > first job). As I mentioned in an email on this thread yesterday, most of > > our legacy code is "just leave it alone, it works" code. We are in the > > process of rewriting things, but, that takes time. We try and mess with > the > > legacy code as little as possible. Something as simple as auto formatting > > with PhpStorm has broken things in the past - so I don't trust an > automated > > tool to fix the short tags for me. Even if I'm the only person that has > > participated in this thread that has to maintain a codebase that consists > > of non-portable code with a large amount of short tags, that's still at > > least 1% of those that have participated in this thread, or one of its > > predecessors. > > > > Another thing to keep in mind is that most of the people writing and/or > > maintaining "non-portable" code probably don't work for a company in the > > software development industry. When I want to upgrade PHP, I have to > > convince our leadership of the value of me spending a couple of weeks > > fixing BC breaks. I have to show why that is more valuable than spending > > time on the development of new functionality. The more time required to > do > > an upgrade, the more likely it will get punted to a future date. > > > > I'm not against BC breaks in general - they are a necessary evil. > However, > > it's important that the negative impact of that break is far outweighed > by > > the positive value it brings. I'll leave it up to each of you to > determine > > how positive of an impact removing short tags would bring. I can promise > > you, though, that the negative impact would be VERY large. Just because > you > > don't personally have to maintain any code that uses short tags doesn't > > mean that there aren't other developers out there that do. Every BC break > > is going to lead to a subset of users that will decide to not upgrade as > a > > result. It will also lead to a subset of users that will decide to use a > > different technology (node, .NET, python, etc.) going forward. Many BC > > breaks are worth that risk. Is this one of them? > > > > Many people have talked about the potential impacts of keeping short > tags. > > I have yet to see anyone give an actual example where they have been > > negatively impacted by their existence. I've given you my personal story > of > > how removing them will negatively impact my company. I welcome anyone > that > > can provide an actual incident where the existence of short tags hurt > them, > > or, the continued existence is likely to have a large negative impact on > > them in the future. > > > > > > > Zeev > > > > > > > > > -- > > Chase Peeler > > chasepeeler@gmail.com > > Thanks for sharing your stories about issues. Maybe we should start > also thinking about the impact on the language attractiveness to pick > it when starting a new web project since the core people can't come to > conclusions how to make the language more consistent on the long run > (PHP 9 etc)... With more and more ambiguities, inconsistencies, > lockups, and dead ends behind the language there is probably also a > bit of a factor to consider that it lowers this attractiveness. > Meaning less people will think of adopting it (with all the things > combined - short tags, that and that inconsistency not being removed from PHP due to major disastrous BC break there and there). So, the damage is also on the long run with more and more locks and dead ends > not being able to be fixed and cleaned. > > Can you find me one person that has chosen to not use PHP because it supports two types of opening tags? I'll make you a deal. If we can get rid of every other "inconsistency, ambiguity, lockup, and dead end" in the language, then I will come out in full support of removing short tags. Let's also get rid of every camelCase function and change it to underscore_case. That will help consistency. I'm personally willing to bet that more people are turned off by PHP's inconsistent function naming than the fact it allows multiple opening tags. I'll amend my offer. If PHP reaches a point where all core functions have a consistent naming format, I'll support removing short tags. We have to get rid of the old function names, though, otherwise people might get confused. Honestly, at this point you're just being a bit silly. No one has ever spoken out against BC breaks that have a positive impact on the language. Heck, if there isn't a negative impact to a BC break, I don't think anyone really cares, even if there isn't a positive one. There also isn't some slippery slope out there where if we allow short tags to remain we'll suddenly return to all out chaos where we don't continue to attempt to improve the language. "with all the things combined - short tags, that and that inconsistency not being removed" That reminds me of a baseball statistic. Hank Aaron and his brother Tommie combined to hit the most home runs among brothers: 768. Hank Aaron hit 755 of those. For those that don't follow baseball, only Barry Bonds has hit more home runs than Hank Aaron. Short tags are kind of like Tommie Aaron when it comes to the negative perceptions people have of the language. Getting rid of them really won't make that much of a difference. > > -- > Peter Kokot > -- Chase Peeler chasepeeler@gmail.com --000000000000e1a44a058f9cb0c1--