Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100544 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13727 invoked from network); 12 Sep 2017 16:17:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Sep 2017 16:17:36 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.42 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.42 mail-wm0-f42.google.com Received: from [74.125.82.42] ([74.125.82.42:46776] helo=mail-wm0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 06/35-10715-F9808B95 for ; Tue, 12 Sep 2017 12:17:36 -0400 Received: by mail-wm0-f42.google.com with SMTP id i189so61228913wmf.1 for ; Tue, 12 Sep 2017 09:17:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:user-agent:in-reply-to:references:mime-version :content-transfer-encoding:subject:to:from:message-id; bh=itTaRiZN/1yBfXlrYN7+TnOtqnuhdTFdYHV+GFBNrac=; b=WpPYLcE5qoGr/ZUtX0Z1+O9DWKFIoeQnSBiYPiWalb6oyArV5y3k/CyH3cE3ZKvZLx 2GL8xxEU1RjItDacmjxodrGQGhrsB1ldQSO6zMLaYQNH41Xs6EVNpLAAiYTUHPD8zwvl 14nqleHCYOOHkRBMeYTXFdBLnVXVLtwVyjSRMaXe3zGpg44883uIimarcQV6NNj0yRuA ftA2hdsp+hsWxyvzEGP8TRva/0Y1agNXu/e0QTSucdQSZE9mVb8WjHpMoDuQl/jC9TZh th3coEKTNeouG6EuUGWTPAMPeOZF8HoHkozB26LT5M3L6dGgS3zI0oqCstdtWNAC1DNW dwvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:user-agent:in-reply-to:references :mime-version:content-transfer-encoding:subject:to:from:message-id; bh=itTaRiZN/1yBfXlrYN7+TnOtqnuhdTFdYHV+GFBNrac=; b=i1PCeMHlJBASRQe7rxOIE2DTeMoRf3MRGwkwWHs1GcqlOQz7FvfQmX32kQ54MBgBMs hTCsWbgdzhBs3VcVyBOAoAk/IDh6NQ1G5z3godEeVj5W4V3aAIiQf/P/bkr1QXKFo4+a 4cluvAhbRuJcQ2RJjacJKacNxM6XgVvp9Igcd6dz5SOWh5TDnuc5Wiaub+XMBlngf3Wx MAX1LJvrH2RDTBKEW0KD9DFpSIu28jqlQs7JpQRWXnpW1RyxoR1SLxccXibS4LHSmSZ9 eqacEVGQgOE76LgprFud+//x4rxEsgxQo/pEWaJl/9cqsh1R4AbraRk/l8DLSbO8Y3aY eL3Q== X-Gm-Message-State: AHPjjUi75SeJQiB/4hSMXLI47tnEM00IdcGiXrLkIFM/xnnd5CS7Emyk nsKrEAKwunQvEUvICk8= X-Google-Smtp-Source: ADKCNb6OyripIc+EdGOGWdpy7OuZGkPG3HuWwJBtKPf1SyOd6TjVitxI3KA0jYp1dwDJs6riZIW+Fg== X-Received: by 10.80.206.11 with SMTP id y11mr13443954edi.94.1505233052842; Tue, 12 Sep 2017 09:17:32 -0700 (PDT) Received: from [10.6.228.75] (188.29.165.191.threembb.co.uk. [188.29.165.191]) by smtp.gmail.com with ESMTPSA id t49sm2893260edd.62.2017.09.12.09.17.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Sep 2017 09:17:31 -0700 (PDT) Date: Tue, 12 Sep 2017 17:17:28 +0100 User-Agent: K-9 Mail for Android In-Reply-To: References: <6601584d-c76d-4ed7-b4d6-b95e1b401cae@tekwire.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable To: internals@lists.php.net Message-ID: Subject: Re: [PHP-DEV] Deprecate and remove case-insensitive constants? From: rowan.collins@gmail.com (Rowan Collins) On 12 September 2017 15:52:38 BST, Levi Morrison wrote: > array_map(sum2, $input1, $input2); > >Currently that requires `sum2` to be a constant=2E=20 I'm not clear what this has to do with case sensitivity; the problem here = is that we don't have a type of "function reference" (nor "class reference"= ) so simulate such references with strings and runtime assertions=2E Are you saying that without case sensitivity, the language could deduce th= at sum2 in that case was a function reference? That seems optimistic: not o= nly can you have a class, a constant, and a function all with the same name= , but you can't actually know which exists until the line is executed, beca= use all three can be defined at any time=2E This kind of ambiguous syntax is precisely what I was trying to reduce by = deprecating "undefined constant as string", and a similar "convenient fallb= ack" (from current to global namespace) is currently the biggest thing bloc= king function autoloading=2E If we want function and class references, they should have their own, unam= biguous, syntax=2E Apologies if I've completely missed the point here=2E Regards, --=20 Rowan Collins [IMSoP]