Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100608 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55470 invoked from network); 14 Sep 2017 23:35:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Sep 2017 23:35:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.169 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.192.169 mail-pf0-f169.google.com Received: from [209.85.192.169] ([209.85.192.169:55988] helo=mail-pf0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 08/97-19300-4221BB95 for ; Thu, 14 Sep 2017 19:35:01 -0400 Received: by mail-pf0-f169.google.com with SMTP id r71so472176pfe.12 for ; Thu, 14 Sep 2017 16:35:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=3cw1at/6bUbDbJIMn0XU1m5PKCMWqNuG7sofk7N1XEk=; b=eCgjpOgGpPIGDtCPDQYS6TGJxV8EMmpkIyXrejoUVX8NmFMRRZlSOtOC0YNLhaPG/6 bAG5VlChoQ2FL3UEfZG8PdBghJ/J55Vglr/QxFacIBLaa+2a6M/NcCyGtqgXHF+EyLkU XjO61X1LmxIoIHAU+Q7Dp8kbt4+Q8lZgRAo3PCEPM+D0b06GV5W679BYS6q6KWQxxlFU Smx7tSH/tZFUbWZE0Yz09YsTDQpL4c31BhDTVgqYs7UF2w50U3bjyZjBeSIs+Kb23rQt 1rjbcyNYooxkLRiPcwZG9k6UfTP8IYry1gyuOC5DHr42nkcGAbW+XJPAEvct8wXAKHOu CivQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=3cw1at/6bUbDbJIMn0XU1m5PKCMWqNuG7sofk7N1XEk=; b=XdSHf/GrLg6sdra+RXThcXarupAIhRLheTHNnUOU92fxM7HkaQhaTyoAF3RUoD3kYT hU2IZsmKVeRteom7PM/EEdkRRdZ7hGlI9n/89ZRaYEeDD4bJeloBan4CAiOxDE5v1/CK c5MrDOjRTvR1TR6fhIUYpM2lc9SNgNwNl786veGegjJBWW0A1vxRer0NMdOqwzXeDx29 Bjh4A5nXAKsyBJhQI5Q+QOLBHHYMg/Qb/RLeo4+QToO3DbooptJZxcjyVrms4HuKNjyh m1DLyfXOPyh6moinF6PTozM4EIUfAGZ93sxRjqtJ9/l37pf+h7jzKQfa4rHD/Zmlvr5m Ba3g== X-Gm-Message-State: AHPjjUi3h7kfrYfn86bmeKdVNVE4bfzM6H+dJ2aCMgiXVcEcVrt6yTjT YEfSqBnaXRQEeNzhEgo= X-Google-Smtp-Source: ADKCNb7TzULPQMimhOmrZUYnj2+vgPdGdGGIMtc2cHDSAOuyyaex0Xi5M1peCWIZRgS0FoZbHB+9CQ== X-Received: by 10.101.83.4 with SMTP id m4mr14974481pgq.266.1505432097372; Thu, 14 Sep 2017 16:34:57 -0700 (PDT) Received: from Stas-Pro-2016.corp.wikimedia.org (tan4.corp.wikimedia.org. [198.73.209.4]) by smtp.gmail.com with ESMTPSA id y83sm32416605pff.167.2017.09.14.16.34.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Sep 2017 16:34:56 -0700 (PDT) To: "Christoph M. Becker" , Nikita Popov Cc: "internals@lists.php.net" References: <752eaf1d-5603-70f5-8e69-b8243547cad1@gmail.com> <320b3863-e36b-2ed4-543b-fcbd433b1c56@gmx.de> Message-ID: <125e90c8-35f8-fbfc-67d1-29109ccb15a5@gmail.com> Date: Thu, 14 Sep 2017 16:34:55 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <320b3863-e36b-2ed4-543b-fcbd433b1c56@gmx.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Deprecate and remove case-insensitive constants? From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > It seems to me that this would miss the point, namely to introduce some > consistency, and to be able to If working code would be broken, nobody needs "consistency". I've built tons of software, and never ever any single client asked me "but do you have 'constistency'? Surely, I'm not against that warm fuzzy feeling that some call "consistency", but not at the expense of breaking working code. > All programming languages that I know of are either case-sensitive or > case-insensitive. PHP is the sole execption (CMIIW) – and the potential > cognitive overhead during programming is hard to justify. Constants are Would be very good argument if we were designing a new language called "PHP". Unfortunately, we're about 20 years late to that. When we design the next one, we'd be sure to take it into the account. For this one, not breaking people's working code is IMO a much bigger and more useful concern. > define('FOO', true, true); // public const in ext; transcript from C > const FOO = false; // in global app code > > Why doesn't that fail? How am I supposed to write the extension It should fail, but that's not what we're discussing here. > I completely fail to see why we should retain the possibility to define > case-insensitive constants in extensions. Deprecate that for PHP 7.3.0 We probably should not, but we should keep the ones that were there, if they were. If you say that everybody already used CONST_CS then great. I see however that some extensions (e.g. ibase and mcrypt) do not use that flag. -- Stas Malyshev smalyshev@gmail.com