Re: type hinting
| From: | Stefan Esser | Date: | Fri, 04 Jan 2008 16:41:00 +0000 |
| Subject: | Re: type hinting | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-34409@lists.php.net to get a copy of this message | ||
Good Morning everyone,
one should not forget that type hinting has some clear advantages the
anti type hinting advocates always try to forget...
* the code gets smaller because not so many typechecks in every function
* because the code gets smaller it is faster executed (userspace
typecheck is slower than "engine-space")
* without all these type checks the code gets easier to read
* with type hints byte code optimizer can optimize the code far better
-> faster execution
* with type hints static analysing tools that check for
bugs/vulnerabilities can perform far better (intra procedural analysis
gives more information)
Stefan Esser