Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100545 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16469 invoked from network); 12 Sep 2017 16:45:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Sep 2017 16:45: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 74.125.82.45 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 74.125.82.45 mail-wm0-f45.google.com Received: from [74.125.82.45] ([74.125.82.45:46272] helo=mail-wm0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 91/B5-10715-D3F08B95 for ; Tue, 12 Sep 2017 12:45:50 -0400 Received: by mail-wm0-f45.google.com with SMTP id i189so61846970wmf.1 for ; Tue, 12 Sep 2017 09:45:49 -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=fMs8PcH5bs3vWqMNXWfV1q5BZT46ObxJLkjJjMQl698=; b=QxPM3taZKJUIO0J+R1C8U4OXie5ruUuSekuyS9qTsWwrQHyEasP0c85+P/tM2pXXrA XXgCEJ/As64vnqSYsEsANo6B4LLSG8+meyvHcI+1+s6dX0DhFmVzPWukT+I1oXyTJdSz JF11sDlA7i6TPqxyazUMqo/+iNt9jobSdyxu7bkO4dt7UoNYr77Yv/Nwc8eSeFTRC5Ow nTSVRRue3or9OZyvg/Jo10AO69cmHbscmvaoJZfCb/v2Ee9CBJon/dT+NsufS2FX/Z4D phJqnXk1xkKgvrNw+2KjBjAonpV+d6PouaVfcIaBuOFjXR5gLmZ8noiYltuyfsrQ0zix jROw== 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=fMs8PcH5bs3vWqMNXWfV1q5BZT46ObxJLkjJjMQl698=; b=r8NiJy9EeAQoPKYAXV++2B6iw+w0Jnab8FFwHUE4VDC28rG09FD/Oh2j1eEQjgq+Iy q6L/Yd5mDvbvhwYKVRuLrrrAnd6kd+Pqfd8ix3tRqQ7XxzHBOglWd+ijBA5mEzJnIApX SBzD75TAIdBtw3TaDC56fUwXOCNhF7aFG/gLPRXrFXEtQpN1uDgcqSkGkRxIvMWaJIkQ NWJJqGcpU36tlxC6r2Og0lY3s7ld6yvKwTJa5HclC155b6AUa5ZlmycC6uIR1xXDyxVp ZrXKf7hESzKwWr6netp/1mgTtVhU9h7B1SDeozSGWHOxsQOvo3v6UdXtmud/lAREq8b7 MbAg== X-Gm-Message-State: AHPjjUh8QoQkLcShIQVQlawEYi8rM5mDgVK+Ce5+I6ro5Nd2A43RCzl5 zFlaw9l2cGakS+rl775fmDceKNYt5W5Ulm8S8G0= X-Google-Smtp-Source: AOwi7QBFP2agYhw6WU4y+S/c/iTtvDJVArfDPnjdYaRheZZe4OP84MPe0lV7nwgDeGrdHZp3CNaHLdFpJcFv52rWjYY= X-Received: by 10.28.73.133 with SMTP id w127mr128259wma.55.1505234746827; Tue, 12 Sep 2017 09:45:46 -0700 (PDT) MIME-Version: 1.0 Sender: morrison.levi@gmail.com Received: by 10.28.193.130 with HTTP; Tue, 12 Sep 2017 09:45:46 -0700 (PDT) In-Reply-To: References: <6601584d-c76d-4ed7-b4d6-b95e1b401cae@tekwire.net> Date: Tue, 12 Sep 2017 10:45:46 -0600 X-Google-Sender-Auth: u5h7z2h0jC20y0idVvu73mwIY0E Message-ID: To: Rowan Collins Cc: internals 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) > Apologies if I've completely missed the point here. Oh well, it happens. > Are you saying that without case sensitivity, the language could deduce t= hat sum2 in that case was a function reference? That seems optimistic: not = only can you have a class, a constant, and a function all with the same nam= e, but you can't actually know which exists until the line is executed, bec= ause all three can be defined at any time. Close. If we make case sensitivity consistent (either all insensitive or all sensitive) *and* merge symbol tables then we can get actual features out of it. As it stands just changing the case sensitivity does not buy as any features for our BC break. The rest of my message only makes sense once you understand I was proposing unified case sensitivity for all symbols *and* merging them into one table. >> array_map(sum2, $input1, $input2); >> >>Currently that requires `sum2` to be a constant. > > 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. This confusion stems from the aforementioned items. > If we want function and class references, they should have their own, una= mbiguous, syntax. My point was rather that if we fix our inconsistency issues and merge the tables no such syntax is required; all existing syntax works. There are engine changes that have to accompany those as well, obviously. In summary I think changing constant case sensitivity is too small of a step to gain us anything, but would be *very* happy to take it further because it will give us actual features for our trouble.