Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73060 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57611 invoked from network); 11 Mar 2014 10:44:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Mar 2014 10:44:41 -0000 Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.169 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 209.85.128.169 mail-ve0-f169.google.com Received: from [209.85.128.169] ([209.85.128.169:52291] helo=mail-ve0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 97/B3-29501-819EE135 for ; Tue, 11 Mar 2014 05:44:40 -0500 Received: by mail-ve0-f169.google.com with SMTP id pa12so8688970veb.28 for ; Tue, 11 Mar 2014 03:44:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=eBksE2uFEVZiGqoyzjbObimRn26F7C8uWtkEKunslUg=; b=xQQ5f3nnVlnrSS/MD2lUHj2JyvuxS3Bqxa+lAPe+sQj5bJZs9NQFk3Hi5C5tfpmTDl Xvc6Ul2TH1hq8pemmDDM2mcaMZ7NKkBZeF0BQusIyVLxOof3EOeV8PpVVnju2Qh3gk9B +k10dnCmfTnw9atSSyl/TA1WzufmD/GqaXj1JDZ5mqPhAeuGyCy1knUimA8L55yB3Fut BBsprXmdeG41wJhvf264OV1+Mn6dtMY0LiKudo7hS+Vu3Re7UpfaUeKtojkDcHqUsQYY kl7oa/KnGKIh0Z/gMQfa3I3X/GdJlOBTf2cnUMlUYawKIUsbGtQv8KHHD7DPGD5Nm3V2 dL8w== X-Received: by 10.52.81.66 with SMTP id y2mr26180982vdx.23.1394534677613; Tue, 11 Mar 2014 03:44:37 -0700 (PDT) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.220.81.68 with HTTP; Tue, 11 Mar 2014 03:43:57 -0700 (PDT) In-Reply-To: <531C21A9.30002@lsces.co.uk> References: <03CFE6C6-0742-4928-BD2B-E9C920E9246A@ajf.me> <29BDF40C-562D-4943-877B-70701335D3AA@ajf.me> <531C21A9.30002@lsces.co.uk> Date: Tue, 11 Mar 2014 11:43:57 +0100 X-Google-Sender-Auth: t8E4CajCXyyi83Q6p5E942E4Bzs Message-ID: To: Lester Caine Cc: PHP Internals Content-Type: multipart/alternative; boundary=001a1136776a160fad04f4526806 Subject: Re: [PHP-DEV] Idea: ifdef-like feature to ease userland BC From: jpauli@php.net (Julien Pauli) --001a1136776a160fad04f4526806 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Sun, Mar 9, 2014 at 9:09 AM, Lester Caine wrote: > Rouven We=DFling wrote: > >> I really don't want to come across as hostile, but this seems poorly >> thought out. We all like to play with the new shiny, but I don't see suc= h a >> feature benefitting the quality of the code out there. >> > > I don't mind coming across 'hostile' ... > The idea that we need to add additional hacks to get around the fact that > some 'shiny new features' simply don't sit well in the vast majority of > legacy code. If there is an existing codebase designed for a previous > version of PHP, simply hacking in bits that might improve things for some > later users is just wrong full stop! To get the best out of many new > features the code needs to be redesigned properly! > > If one is designing to support older versions then one simply does not us= e > the new features. e_strict requires enough structural changes that > something like this would not work anyway, so there will be many places > where even this hack will stop legacy versions of PHP running the code? I'm not in favour of such thing. - It adds very complex preprocessor code, making the overall PHP code hard to read and understand. Leave preprocessor to C. - OPCache already does many things to try to improve the generated code at compilation, so that execution OPCodes are optimized depending on the environment. There still has many ways to improve things in here though. - The more we add features to support multiple PHP version, the more slow people will migrate. You want to absolutely use "yield" and pretty nice new syntax feature of PHP ? Simply drop your support for older PHP versions. That's what well-known-frameworks did with 5.3 (mainly to benefit from anonymous functions and namespaces), and that's what they'll have to do for next PHP versions. Julien.P --001a1136776a160fad04f4526806--