Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103911 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 44752 invoked from network); 31 Jan 2019 15:04:02 -0000 Received: from unknown (HELO mail-io1-f47.google.com) (209.85.166.47) by pb1.pair.com with SMTP; 31 Jan 2019 15:04:02 -0000 Received: by mail-io1-f47.google.com with SMTP id b23so2341193ios.10 for ; Thu, 31 Jan 2019 03:43:54 -0800 (PST) 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=N2nxrxdcasOBAHRTofyJp2BJqV862ihwnS2L2zWN/aU=; b=F0EbSGvQK3eifbEmyS/2ybkFmbuUy6BQdSRtwPy57r3oGYhiIBjOCUDf/aoKBwb50B zi1c4T644VyImc8YTLG4QyXhITZBeb08olGJTZga/0KzGXNmbrBU/DOLKgTnVyHdwm3P sg+TWPo1D2CVa2+OEQqxbdTCuDCAe0WhDiOI57DMybDHD9Rfu2wlD6JUrPVcmPG4dD+6 4wnTe7cwcK5gwWPwqx9bEzS30v2R/liyr0Gbkn0XNfH+MHY4m10Ielyg+qr5CsYS6TEl fnmRIzFKDl/75fhN8Iz+JNhqtXhq2F9KiNmvghm/LlatiorXYZCYzKyOkk7A17e2j8lp 7SqQ== 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=N2nxrxdcasOBAHRTofyJp2BJqV862ihwnS2L2zWN/aU=; b=T05vL37QyVnaaqwSxYhaBBy8WOpsbJEGzhaO8h08AFxCMriD9iKXFuCdlPIcsZaABS kFdtbzGxIUrx4tbfNR5ZusT73UL08xH4Up6Lzo7zzvbZ9F6yNSCODfvaI84PZTn0Vkbh tX7WNVayikZe4z9s4PLU/LBIE7kmcGWvEFOpen38aC6avUKPETCfC7Ffycx+/iS/Ottr afDKZEr0wb65ssbsZZtFEH+o2QAu6G8GTthZv3svoEStOePFciWE7rczIu6AsKAKpBL7 zzJtg9eAsg0VvYabqb/GSgIdBsWznLnnmWaulggOXT0u8TmywItb1Dvg6YExz64+6SPM kFew== X-Gm-Message-State: AHQUAuYWQrJa9vUWKLblPn/nfIPBeS9j/lEu1syX7ZoMnZD4YBhXlu/H 2T9TEoBcdCv86Q6ARkfnKExxnsudHl09hrqf3uM= X-Google-Smtp-Source: AHgI3IaZMK95Zn1Qwyg0h8GHjuWqMQMFFRvCMrtu26qliPBnJAfkV/h87agduuYlyVr6UDZhKdQHoAYYvbq2oaYC50I= X-Received: by 2002:a5d:8ac6:: with SMTP id e6mr4744558iot.235.1548935034409; Thu, 31 Jan 2019 03:43:54 -0800 (PST) MIME-Version: 1.0 References: <0243D3A4-2C15-4B31-81A8-C2E5892913F9@koalephant.com> <2d8efb96-ed1f-28e4-e0fe-603a2d0f1962@gmail.com> In-Reply-To: Date: Thu, 31 Jan 2019 11:43:43 +0000 Message-ID: To: Benjamin Morel Cc: Peter Kokot , Internals Content-Type: multipart/alternative; boundary="000000000000819a740580bf8a91" Subject: Re: [PHP-DEV] Deprecation ideas for PHP 8 From: rowan.collins@gmail.com (Rowan Collins) --000000000000819a740580bf8a91 Content-Type: text/plain; charset="UTF-8" On Thu, 31 Jan 2019 at 10:53, Benjamin Morel wrote: > Please forgive my stubborness, too. I fail to see how WordPress supporting > PHP versions that have been EOL for YEARS can be of any help to the > community? > I agree, it probably doesn't help the community; but it happens, both in open source projects, and in the many private code bases which are written in PHP. The more breaking changes we make in the language, the *more* likely it is that people will stay on old versions, where their code works without modification, and have a negative opinion of upgrades. > Now what prevents PHP from adding consistent function names / APIs, and > deprecating the older ones? We can keep the old ones for 10 more years if > you wish, but at least new PHP code can start using the "correct" ones, and > progressively the share of PHP code out there using the old ones should > progressively get lower over the years, up to the point where we could > eventually decide that it's not worth keeping them. > The problem comes if the share using the old names *doesn't* decline enough (and how would we even know?). What if people's muscle memory, their coding standards, their need for progressive compatibility, their tools, the tutorials they follow, the code snippets they copy, all make it easier to just keep using the old names? Then our "deprecation" means nothing, and we are stuck with a long list of aliases to maintain, and people learning the language scratching their heads at inconsistent examples. To be more positive, I am all for introducing new ways to do existing things in the language where they have real benefits to the user. For instance, a new file-handling API, with better error handling, and object-based streams, would be great; or a replacement for the frankly awful curl functions. Perhaps even a well-designed implementation of "scalar methods" (e.g. being able to write [1, 2, 3]->map($callback)->filter($callback);) would have users enthusiastic enough that they *want* to upgrade their code to use it, although it takes us close to "completely new language" territory. If we can persuade every user of PHP that the change is bringing them a real benefit to outweigh the cost of re-writing and re-learning, then we can make grand changes to the language; I don't think moving underscores around will ever do that. Regards, -- Rowan Collins [IMSoP] --000000000000819a740580bf8a91--