On Fri, 2008-01-04 at 17:41 +0100, Stefan Esser wrote: > 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
True. > * because the code gets smaller it is faster executed (userspace > typecheck is slower than "engine-space") Very true, type hinting would be many times faster than using is_int, etc. which puts to rest any argument that type hinting will be bad for performance. > * without all these type checks the code gets easier to read Yes, more concise and compact without manual type checking. > * 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) Also true. Applications like PHPDocumentor could make good use of scalar type hints. > > Stefan Esser > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php