Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100677 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49209 invoked from network); 16 Sep 2017 15:24:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Sep 2017 15:24:50 -0000 Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.175 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.128.175 mail-wr0-f175.google.com Received: from [209.85.128.175] ([209.85.128.175:53093] helo=mail-wr0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 84/F3-19300-1424DB95 for ; Sat, 16 Sep 2017 11:24:49 -0400 Received: by mail-wr0-f175.google.com with SMTP id c23so3558856wrg.9 for ; Sat, 16 Sep 2017 08:24:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=C1rfbyxXKvRh3k+/7NKXByH5ondkOXw9tk4XurMpEFI=; b=TEZVJij2pkMdKWe0YbSR+yH9peXmnN9PQbfBdPubILbQACgOeVBAGwo1/O1f3IwdP7 Zmk6n7DkTkeO3Nwa2akoocrGecP4glMSLHsuWy+27T/ifWbXMkNchQ51sFyOemtSMTGi Nr1EySfuK6szfHrFC14kc9xqMYEYE+oQLW6SISky2jmGrnunj6OFov5HrZOIvgR3oZpD d+cMBcZvXdzxCRBTvooMH8h53fK8AEuDaekaZMYXrjWff+KqYn1+kaac7ZR8ZF2fu4no OJFo6UAo80WMyi18Ji3+OFmp31yBAeqNA7wdxZGRrUNkRkkGKkrWcEIQgrhzZCXUvF5o C2RA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=C1rfbyxXKvRh3k+/7NKXByH5ondkOXw9tk4XurMpEFI=; b=ngn5QMJXWiav9W9R/pfTZBq6vY/QIogQmmWP5gM9o+HKtgaYQYwNk5IqltT0UNM7H7 LUfex44LPATU+Va5LVTKrPrlKFHabsi32BYAyN2w8udkzYbczRPMI8785koQG6INMPqq lIldyqiidkWUnGZmV6sj3Vlr70cqQNOzmGyZ9HsWtwRj1RwumDQYHQZy5433Ns6Hi97U m/IanrttUMuqJ1/knlltDJknzqBwKd5u5z3nkxp8yi5vM0NkMaTWyyGdG2rvhY1cRgZd gr8xLHD0ju4BEXfppOxTZ782Oh+YXxZB2kwSfKsA6EjbTZNvImTJ0fCKSSn5LFmXqqWk JboA== X-Gm-Message-State: AHPjjUiPzrVZdzYKoI0jTE8cN7uOs18wBVI8BXqGVwRSxa1S2D1oE3tU QwsxjlQlnjYBTdbTNtpxCAS8Rwio36O9OH/+Qgs= X-Google-Smtp-Source: ADKCNb6nVdFai3xlBuLHujEqT/FeRysE4bqrZoapBKlke0N8kffjgb36k4lUMCzsVSQ2o0wToAegX73l9tknhr34zJM= X-Received: by 10.223.136.119 with SMTP id e52mr22169574wre.225.1505575486183; Sat, 16 Sep 2017 08:24:46 -0700 (PDT) MIME-Version: 1.0 Sender: morrison.levi@gmail.com Received: by 10.28.193.130 with HTTP; Sat, 16 Sep 2017 08:24:44 -0700 (PDT) In-Reply-To: References: Date: Sat, 16 Sep 2017 09:24:44 -0600 X-Google-Sender-Auth: vWy06Q_78_uHm6enwgA9VJMBHw0 Message-ID: To: Zeev Suraski Cc: "Christoph M. Becker" , "internals@lists.php.net" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Deprecate and remove case-insensitive constants? From: levim@php.net (Levi Morrison) > First, in the example referenced above, arguably, making all constants ca= se insensitive would in fact be the better solution - as you likely don't w= ant both sOmE_CoNsT and SOME_CONST, or more reaslitically - Some_Const and = SOME_CONST to both exist in your app - a situation case sensitive constants= would happily let you do. That said, I think the scenario of having two = define()'s, both define the same constant with different casing is such an = edge case we really shouldn't put too much emphasis on it. This argument holds no water in my eyes. 1) Can you tell the difference between YEAR and =CE=A5EAR? I can't. That's a Greek Capital Letter Upsilon, not a capital ASCII Y, in the latter. This situation is worse and irreconcilable. People do this sort of thing from time to time as obfuscation or for clever debugging puzzles. It's not really an issue in practice because it's confusing and so people avoid it. 2) sOmE_CoNsT would be absolutely terrible to type over and over. Nobody will want to subject themselves to it. It might be done from time to time just like the unicode abuse. > Which brings me to the second thing - deprecating features - even if they= aren't the best features in the world - should only be considered if there= 's very substantial gain to be had. Breaking compatibility has substantial= cost on our users, and consequently - on the PHP project. While sometime= s breaking compatibility is warranted - for security, reliability or perfor= mance - it is, in general, something we ought to do our best to avoid if th= ere isn't a strong case for it. With all I've said I still agree here. Deprecating case-insensitive constants *by itself* is not a substantial gain. This is why I opened with my very first reply in this thread on a note of combining it with other features that *would* be substantial. However, other people have really wanted us to focus the discussion on deprecating case insensitive constants only, and if that's what we do I'll be voting "no". However it is something I really would like to see in connection with other features or changes.