Re: Generics proposal

From: Date: Mon, 22 Oct 2012 23:32:33 +0000
Subject: Re: Generics proposal
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-63605@lists.php.net to get a copy of this message
On Tue, 2012-10-23 at 00:57 +0200, Christian Schneider wrote: > > Basically it means that you type more (redundant) stuff to allow the > compiler to check some errors. Which we can't do due to PHP's dynamic nature. For the engine to take benefit from it we'd have to change the language. All we do,when implementing such a feature is adding a default way so IDEs and other tools can do their checks and to enforce specific runtime(!) errors (while in effect all it does is swap one kind of error (fatal error, not existing function) for another (so called "catchable" error, wrong type)) at the cost of making some operations, at least function calls, more expensive (more things to check at runtime - has a small impact even when not used ... and that while our fcalls are already relatively expensive ...) johannes

« previous php.internals (#63605) next »