Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85354 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95065 invoked from network); 21 Mar 2015 04:15:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Mar 2015 04:15:45 -0000 Received: from [127.0.0.1] ([127.0.0.1:19212]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id 3F/D6-64120-070FC055 for ; Fri, 20 Mar 2015 23:15:44 -0500 Authentication-Results: pb1.pair.com header.from=nathan.o.wesley@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nathan.o.wesley@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.68 as permitted sender) X-PHP-List-Original-Sender: nathan.o.wesley@gmail.com X-Host-Fingerprint: 209.85.218.68 mail-oi0-f68.google.com Received: from [209.85.218.68] ([209.85.218.68:34097] helo=mail-oi0-f68.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5B/D6-64120-C2DEC055 for ; Fri, 20 Mar 2015 23:01:49 -0500 Received: by oifu20 with SMTP id u20so5194988oif.1 for ; Fri, 20 Mar 2015 21:01:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=U60iYqowM21FhGTLx+7AVKTqptXFGR45x1KFVHUaPlg=; b=JdBOMT7yXHfpZ8IdRbkP1Am1UlRlGHMSHo95t95HVDOFgEZ4gXIWCjT43n9zDFmP7z WC6HIHRQEXHmkLsvEAtgwd9Xo39d2S6N+YCKCA96/7B4Bra9a54wOstQsr/zjr0x4NfD ncWCHP3+JEzotLKmWrUyH31n5ITzmnUrdP1nfffD08JZYF8UTpZtPKfpTPeIeIjb8Xhh 1pS85r5hpVzhiU6xhiiEDkytqdrW3zbxCTOmf4eBZuoYHHlVVErYdG0Q1BADdxOY/CWa B/crP6TmOCeue2MmjnoCpSyG2Dtdg29BJ/MCCcAVdtAkl8iJgZDkm5POab6UJI7v9ZQG 1kcA== MIME-Version: 1.0 X-Received: by 10.60.150.129 with SMTP id ui1mr68408575oeb.10.1426910505867; Fri, 20 Mar 2015 21:01:45 -0700 (PDT) Received: by 10.182.216.10 with HTTP; Fri, 20 Mar 2015 21:01:45 -0700 (PDT) Date: Sat, 21 Mar 2015 07:01:45 +0300 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary=047d7b4513d8d421310511c47db9 Subject: =?UTF-8?Q?Ten_years_estimated_Plan_to_replace_PHP=E2=80=99s_inconsis?= =?UTF-8?Q?tent_API?= From: nathan.o.wesley@gmail.com (Nathan wesley) --047d7b4513d8d421310511c47db9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I know that many people talked about this over and over. Why it=E2=80=99s not possible to change the old PHP API ? The answer is always because it will make HUGE BC breaks I=E2=80=99ve seen this wonderful idea about scalar objects authored by niki= c github https://github.com/nikic/scalar_objects. This will become even more possible when PHP 7 is introduced because of scalar types and many great features making the idea more reliable. This makes an opportunity to replace the old API with object oriented one preventing any kind of BC break. But instead of using this as an extension because of some limitations like =E2=80=9Cstring=E2=80=9D->startsWith(=E2=80=98s=E2=80=99); the API should b= e bundled with the engine (not written in PHP). This will make the opportunity to also remove any inconsistencies in the API behavior as well. I know that many people here will say that it=E2=80=99s not that important developers get used to this API and many tutorials based on it. But it=E2=80=99s actually really important for the future of the language= may be not so much for the existing developers (I disagree it=E2=80=99s). but this= will also encourage new comers to use PHP. I=E2=80=99ve seen many articles encouraging new comers to learn languages l= ike Python or Ruby, and highly discourage them from using PHP. Also many new projects are using languages different than PHP. (don=E2=80=99t tell me you= haven=E2=80=99t seen this) This will be an issue the number of language users will drop significantly over the years causing the death of the language. I know that this is not an easy task. But this is a wonderful opportunity to do this without BC breaks. I=E2=80=99m not suggesting that this should b= e for PHP 7.0 because it will take a lot of work may be for any release in PHP 7.* PHP internals around 40 people ? not really sure but I know you are very busy with fixing bugs and you have a lot of work already if you think this is a huge task it can be assigned to a good group of people similar to how the amazing PHP Framework Interop Group has accomplished, for Designing the new Object Oriented API. PHP internals will vote on the design and implement it. The old API should be deprecated in PHP 8.0 and removed completely in PHP 9.0 (finally) I hope that you take this seriously and tell me if there are any limitations that prevents this from happening. --047d7b4513d8d421310511c47db9--