Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103972 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 57986 invoked from network); 1 Feb 2019 13:54:00 -0000 Received: from unknown (HELO mail-yw1-f44.google.com) (209.85.161.44) by pb1.pair.com with SMTP; 1 Feb 2019 13:54:00 -0000 Received: by mail-yw1-f44.google.com with SMTP id k188so2616941ywa.6 for ; Fri, 01 Feb 2019 02:34:06 -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=ix8UPHEx6ezd5UWj+9nUFUdE5SD0Gz5v092ydqxE6aI=; b=AajNrcZrwkdWR2+LhJDtW3Jc/sG1FuZWSTMLCaTmv+U6LxoanKxmsfjLpTB1OsMN9G 65K5gQ3QHJlsJFzHZcAgsIkNvjYVRv03mJpY6Si8VxbGGIR42l7sLLT/gNji0ruPaGyH GxlpA4KoZAAY4GQyIdhWUwETUgxpDjERiBm3byl4KsyL09ERNB/Mq6IZbZcmHal2hZmI c6CKMEGKylzsGs1ePNygHrPjTeFQzqbYBOLqE6AAdazAdLlaZ8ecb4GUmigA6TgKoMHv ykYaIXm6zjG7lxYdJ8uh3ow0S2UyIe66duc4RpvoXwT5cQik2RL17JmEx8PTmoOG9TGk yNTg== 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=ix8UPHEx6ezd5UWj+9nUFUdE5SD0Gz5v092ydqxE6aI=; b=JUqSJQThZUPsXElBIreFGv9krJl7XNB3+TNUZNFuH4q6Os1HcnvQwlRpALdRfENcXb tbz5QfjZND4syPci14WJfPsy1Uo0qRmer9tOEok9HeAMC2C8OApovCxBhReBlsdCoGqZ Wmj09QVmSG6pdrzKBcxHS5vTQg+pHsxlngTl20uXVjHojNIQl6kVFZmNSurgD7cQYdob tcHwXN1KW20GMpUJK1AWryvf6iqrFqk6ar/420U56p2JTFG1iYRfYTsMccqez3EHc2B6 lwQ47FzlES5zTQpOqJykwCXp/dxiZKLR1RhbQR5+6q9UKEEqA+jAKchRFKTXWPSRr0fr iPfg== X-Gm-Message-State: AJcUukfD5780QvKBkSaqgXMz++PyhGN9x0ILkm0246fmzomPvsgT2WD2 chqObvBh9DJFTLVIb55QGpGxuFS4dQZzrMH/6Mstcn+H0aM= X-Google-Smtp-Source: ALg8bN6oev1h2aJUInlk8txGsPJQz1pxZQrygCrErlUHZmNzVjfCqgNDib0Sfolw7m4hM+0Q4FgDJ2ZGLyOSohMA+eM= X-Received: by 2002:a81:334d:: with SMTP id z74mr35798661ywz.32.1549017245956; Fri, 01 Feb 2019 02:34:05 -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: Fri, 1 Feb 2019 11:33:53 +0100 Message-ID: To: Rowan Collins Cc: Internals Content-Type: multipart/alternative; boundary="000000000000b23efd0580d2ae62" Subject: Re: [PHP-DEV] Deprecation ideas for PHP 8 From: benjamin.morel@gmail.com (Benjamin Morel) --000000000000b23efd0580d2ae62 Content-Type: text/plain; charset="UTF-8" > Deprecation notices won't change people's *desire* to change their code. If you raised a deprecation notice for every call to, say "htmlspecialchars", the only result would be people turning off deprecation notices, and missing more important deprecations. You have a point here. Couldn't we add a "deprecated log" feature, that would log each deprecated function only once? At least we could leave an app running for some time, and get a curated list of deprecated features from the deprecated log. On Fri, 1 Feb 2019 at 11:11, Rowan Collins wrote: > On Thu, 31 Jan 2019 at 22:39, Benjamin Morel > wrote: > >> 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. > > > Deprecation notices. Tooling also helps a lot here: IDEs (PHPStorm for > example, strikes through deprecated method names), and static code analysis > tools. > > Deprecation notices won't change people's *desire* to change their code. > If you raised a deprecation notice for every call to, say > "htmlspecialchars", the only result would be people turning off deprecation > notices, and missing more important deprecations. > > > >> ... although it takes us close to "completely new language" > territory. > > > Maybe not, if this can be done in a mostly BC way. > > It wasn't the BC I was worrying about there, but the possibility that > projects would adopt one style or the other, and readers coming from an > "old-style" project might find the code in a "new-style" project rather > alien. In a worst case scenario, it would feel like we had two languages > interoperating on the same runtime, like when HHVM hosted both PHP and > Hack. It's not inevitable, though, just a risk to think about if we ever > get to that position. > > Regards, > -- > Rowan Collins > [IMSoP] > --000000000000b23efd0580d2ae62--