Re: Final variables
| From: | Marco Pivetta | Date: | Thu, 29 Jun 2017 09:25:32 +0000 |
| Subject: | Re: Final variables | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-99675@lists.php.net to get a copy of this message | ||
On Thu, Jun 29, 2017 at 11:19 AM, lists@rhsoft.net <lists@rhsoft.net> wrote:
> in other languages like Visual Basic constants are fast, in PHP they are
> slow, both in define and access
>
Two things here:
1. don't ever consider visual basic for any comparison of any sort: it's
basically (ha!) the worst example of a programming language that I can
think of before malborge
2. speed is not relevant in this scope: program correctness is. Final
properties would allow switching value object representations from accessor
(getter) based logic (extremely slow) to public property based (less
overhead, also in writing).
Marco Pivetta
http://twitter.com/Ocramius
http://ocramius.github.com/