Re: Constants and Access Modifiers
| From: | Stanislav Malyshev | Date: | Sat, 11 Nov 2017 23:44:07 +0000 |
| Subject: | Re: Constants and Access Modifiers | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-101124@lists.php.net to get a copy of this message | ||
Hi!
> Yes, Dart has a different understanding of const, which is exactly why I
> posted it for you guys. In the hope that it helps to get more different
> views on the topic. Currently you are too concentrated on how it is
> implemented in PHP at this time, and argue that it is impossible to
> diverge from that path. Which is simply not true, we only have to ensure
> backwards compatibility.
I am not arguing it's impossible, I am arguing it is not a good idea. We
have the concept of constants in this language, and bolting on it a
completely different concept from different language, which by
coincidence was named with the same term, would only be a source of
confusion. If we wanted immutable objects in language - which I am not
convinced at all we do, but assuming for a minute we did - there's no
reason to conflate them with constants as we have them now. These are
different things.
--
Stas Malyshev
smalyshev@gmail.com