Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107187 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 92627 invoked from network); 17 Sep 2019 13:19:58 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 17 Sep 2019 13:19:58 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id 107392D02E4 for ; Tue, 17 Sep 2019 03:57:06 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp3.php.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HTML_MESSAGE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS12876 212.83.128.0/19 X-Spam-Virus: No Received: from hotpoint-srv.ch2o.info (hotpoint-srv.ch2o.info [212.83.147.179]) by php-smtp3.php.net (Postfix) with ESMTP for ; Tue, 17 Sep 2019 03:57:05 -0700 (PDT) Received: from hotpoint-srv.ch2o.info (localhost [127.0.0.1]) by hotpoint-srv.ch2o.info (Postfix) with ESMTP id 4A1FBA015C; Tue, 17 Sep 2019 12:57:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=ch2o.info; h=date :subject:message-id:from:to:cc:reply-to:mime-version :content-type; s=default; bh=tmcPR0OsfjD9nRLyFEvTObW+iurRC/P9zop YPWzb+Hc=; b=jVnZNL33pPu0Ph7v/Eqgs5rdsIDa5vZ0Sk4a6gKeZ4ZNi3o9QFx eckhtQ0pZ4vBTrii07AOAK1upAWRP6T/oZPGJjmG4Q8EOdpQu7oWIg7KiadVOTxr izf3DvasMAkSEOxWRtAZE6UAM9X9dtX9vD5bLotLPEnzTy6WvtPXVZ0I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=ch2o.info; h=date:subject :message-id:from:to:cc:reply-to:mime-version:content-type; q= dns; s=default; b=LGRf/QVvsFK8QWG3qqC0G3bEll6J5DH/5qee61JswYmpBT DNYTpLQhDDEM36biuy+Pg65ds0PNQXMzH+XrFYatlJlOiXljXpU012tzgi23/xau bXZP73jFOSgnTi857U7fqSMjI3xePa572oXVlGtPfeEt3ybrW980iZXG4gPcU= Received: from hotpoint.ch2o.info (localhost [127.0.0.1]) by hotpoint-srv.ch2o.info (Postfix) with ESMTP id 4612CA015B; Tue, 17 Sep 2019 12:57:05 +0200 (CEST) X-Footer: Y2gyby5pbmZv Date: Tue, 17 Sep 2019 12:57:03 +0200 X-User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0 Message-ID: <1054760501-26038@hotpoint.ch2o.info> To: Daniel =?UTF-8?b?TWFydMOtbg==?= Spiridione , Mike Schinkel Cc: Olumide Samson , PHP internals Reply-To: Mathieu CARBONNEAUX X-Priority: 3 Importance: Normal MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=-9x7GljRaw8o9kUC1MJyz" X-Envelope-From: Subject: Re: [info@ch2o.info] Re: [PHP-DEV] PHP's declining(?) popularity From: info@ch2o.info (Mathieu CARBONNEAUX) --=-9x7GljRaw8o9kUC1MJyz Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, One of the IT futur, is Container (docker like and kubernetes like) and Sin= gle Page Application...=20 On the other language the tendancy is to simplify the start time and single= start of the application (only one process start the application runc) and= simplify configuration; and simplify logging (all on the stdout/err of the= container) to work better in this type of infrastructure. On java side for exemple the tendency is bootstraping the servelet engine (= of tomcat or jetty) in standalone process... no complex configuration... With PHP you must use apache+mod_php, or nginx + php-fpm in the same contai= ner.... they are very comlex to configure (you must configure php, apache/n= ginx, some time +htaccess)... to package... The ideal way is to embed the http server in php to be abel to start direct= ly the php from php cli (php -S localhost:8000) ... The actual http server implementation are minimal... and not very performan= te (lake of event/thread/process manager, and lake of http2 support)...=20 Swoole is perfect exemple of this tendency... but need some addition to per= mit standard php application like wordpress to work directly on the type of= packaging....=20 And also abscence of concurrency (coroutine or thread, native simple multi = process pool like process manager in swoole) are a real obstacle to the pro= gression of php...=20 Swoole add this with the event model (not real threading, user mode thread)= ... but real thread while be a must... Unit project from nginx are good exemple of that and good exemple of these = tendency... Mathieu Daniel Mart=C3=ADn Spiridione , 16/09/2019 20:56: The lack of concurrent PHP features in 2019 is, in my opinion, sufficient=20 reason not to use it for CLI projects.=20 Some companies do not welcome installing extensions like Swoole, the=20 language should have native concurrent features.=20 =20 Daniel=20 =20 El dom., 15 sept. 2019 a las 0:33, Mike Schinkel ()= =20 escribi=C3=B3:=20 =20 > > On Sep 14, 2019, at 5:18 PM, Olumide Samson =20 > wrote:=20 > >=20 > > https://jaxenter.com/php-tiobe-sept-2019-162096.html=20 > > I think this is one of those things we get from voting no...=20 > >=20 > > I might be wrong anyways :-?=20 >=20 > If those specific rankings are legitimately a cause for concern then it=20 > would make sense to do some objective analysis to determine why the=20 > languages that are growing marketshare are growing.=20 >=20 > From the list it seems Python stands out as having the most growth as a=20 > percentage.=20 >=20 > Googling for "why has python become so popular" I get these articles.=20 >=20 > I have copied their top level points but also included the text for the=20 > one point they all seem to have in common, that Python is simple, easy to= =20 > use and easy to learn for new users (emphasis mine in all cases):=20 >=20 >=20 > https://medium.com/@trungluongquang/why-python-is-popular-despite-being-s= uper-slow-83a8320412a9=20 > <=20 > https://medium.com/@trungluongquang/why-python-is-popular-despite-being-s= uper-slow-83a8320412a9=20 > >=20 > 1. End-users just don=E2=80=99t care (about slower performance)=20 > 2. More Productive=20 > "First and foremost reason why Python is much popular because it is highl= y=20 > productive as compared to other programming languages like C++ and Java. = It=20 > is much more concise and expressive language and requires less time,=20 > effort, and lines of code to perform the same operations. The Python=20 > features like one-liners and dynamic type system allow developers to writ= e=20 > very fewer lines of code for tasks that require more lines of code in oth= er=20 > languages. This makes Python very easy-to-learn programming language even= =20 > for beginners and newbies. For instance, Python programs are slower than=20 > Java, but they also take very less time to develop, as Python codes are 3= =20 > to 5 times shorter than Java codes. Python is also very famous for its=20 > simple programming syntax, code readability and English-like commands tha= t=20 > make coding in Python lot easier and efficient."=20 > 3. Execution Speed does not matter as much as Business Speed=20 >=20 >=20 >=20 > https://www.kdnuggets.com/2017/07/6-reasons-python-suddenly-super-popular= .html=20 > <=20 > https://www.kdnuggets.com/2017/07/6-reasons-python-suddenly-super-popular= .html=20 > >=20 > 1. Python Has a Healthy, Active and Supportive Community=20 > 2. Python Has Some Great Corporate Sponsors=20 > 3. Python Has Big Data=20 > 4. Python Has Amazing Libraries=20 > 5. Python Is Reliable and Efficient=20 > 6. Python Is Accessible=20 > "For newcomers and beginners, Python is incredibly easy to learn and use.= =20 > In fact, it=E2=80=99s one of the most accessible programming languages av= ailable.=20 > Part of the reason is the simplified syntax with an emphasis on natural=20 > language. But it=E2=80=99s also because you can write Python code and exe= cute it=20 > much faster."=20 >=20 >=20 > https://www.techrepublic.com/article/why-python-is-so-popular-with-develo= pers-3-reasons-the-language-has-exploded/=20 > <=20 > https://www.techrepublic.com/article/why-python-is-so-popular-with-develo= pers-3-reasons-the-language-has-exploded/=20 > >=20 >=20 > 1. Ease of learning=20 > "Python is the closest language to what I call 'an instant gratification=20 > language,' meaning with very little code, it can accomplish so much, even= =20 > if you are a novice programmer," said Karen Panetta, an IEEE Fellow and=20 > Dean of Graduate Engineering at Tufts University. "This is because Python= =20 > reads like English, which makes it more conducive for a broad level of us= er=20 > audiences to learn. Many of the 'nerdy' low-level details we used to worr= y=20 > about in other languages, such as declaring types of variables or=20 > arguments, are handled by Python, so it makes programming very flexible a= nd=20 > easier to use than other languages."=20 > 2. The explosion of AI, machine learning, and data science in the=20 > enterprise=20 > 3. A large developer community=20 >=20 >=20 >=20 > https://www.skillsoft.com/blog/2018/06/top-5-reasons-why-python-is-so-pop= ular/=20 > <=20 > https://www.skillsoft.com/blog/2018/06/top-5-reasons-why-python-is-so-pop= ular/=20 > >=20 >=20 > 1. Python is efficient=20 > 2. Python has an active community=20 > 3. Python is simple=20 > "With a shorter learning curve than other languages, say Java or C++, and= =20 > understandable and readable syntax, you don=E2=80=99t need to be a progra= mmer to=20 > start applying Python to everyday tasks. Python automatically takes care = of=20 > things like garbage collection and even closes files, opened via the =E2= =80=98with=E2=80=99=20 > statement, for you. People starting out may also find the use of=20 > indentation to signify the start and end of loops, functions, classes and= =20 > code blocks easier than tracking down the traditional opening and closing= =20 > curly braces."=20 > 4. Python is in academia=20 > 5. Python is on trend=20 >=20 >=20 > https://eplexity.com/6-reasons-the-python-programming-language-is-so-popu= lar/=20 > <=20 > https://eplexity.com/6-reasons-the-python-programming-language-is-so-popu= lar/=20 > >=20 >=20 > 1. Ease of use=20 > "Since its creation in the late 1980s by Guido van Rossum, Python has bee= n=20 > specifically designed to be a general-purpose language. The simplicity of= =20 > Python, and its easily human-readable syntax are two reasons why the=20 > language is so popular among seasoned coding professionals and Computer=20 > Science 101 students alike. Python is also an interpreted language, which= =20 > means that you can quickly experiment with changes to the code base."=20 > 2. Supportive community=20 > 3. Corporate sponsors=20 > 4. Libraries and frameworks=20 > 5. Use in big data and machine learning=20 > 6. Efficiency=20 >=20 > Notice in none of these articles is there any mention of static typing or= =20 > strictness or correctness as an attribute that the authors think=20 > contributes to why Python is gaining success.=20 >=20 > So my takeaway would be that if we wanted to see PHP start gaining=20 > marketshare again we should focus on features that make it easier to use=20 > and spend less time on trying to raise the bar for the skill level it wil= l=20 > take to program in PHP8.=20 >=20 > #jmtcw=20 >=20 > -Mike=20 >=20 > P.S. Other ways to grow market share could be to:=20 >=20 > 1. Strive to support data science in a major way=20 > 2. Run on Single Board Computers like Raspberry Pi=20 > 3. Run a CLI via a single executable (i.e. package PHP runtime and PHAR=20 > files together so PHP scripts could be distributed without requiring a=20 > correctly installed version of PHP)=20 >=20 > 4. Empower developers to create cross-platform desktop, also contained=20 > with a single executable=20 > 5. Empower developers to create cross-platform mobile apps=20 > 6. Pursue corporate sponsors (too bad the Facebook ship already sailed.)=20 >=20 > 7. Find ways to get PHP taught in academia=20 > 8. Put more effort into driving adoption for PSRs like =C2=A06,7, 11, 14,= 15,=20 > 16, 18 and in identifying and releasing more.=20 > 9. Strive to make PHP the best solution for AWS Lamba and other serverles= s=20 > solutions=20 >=20 > 10. Embrace all of userland PHP by giving them a voice in the direction o= f=20 > PHP, instead of limiting that voice to only those currently with a vote v= ia=20 > phpinternals.=20 >=20 > Of course just because I included it in the list above does not mean the=20 > PHP team needs to pursue (any of) them. =C2=A0I am just pointing out area= s where=20 > I think PHP could see some growth if PHP pursued it.=20 >=20 > Also, any of the above would require the PHP internals community to join=20 > together for the common-good rather than taking no-comprised positions th= at=20 > each seek one person's view of PHP perfection while blocking everything=20 > else.=20 >=20 > IMO anyway.=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 = --=-9x7GljRaw8o9kUC1MJyz--