Optional Type Hinting

From: Date: Mon, 18 Aug 2014 14:11:52 +0000
Subject: Optional Type Hinting
Groups: php.internals 
Request: Send a blank email to internals+get-76654@lists.php.net to get a copy of this message
Hi, What do you think about merging the following proposals into a single and consistent one: https://wiki.php.net/rfc/scalar_type_hinting_with_cast https://wiki.php.net/rfc/returntypehinting https://wiki.php.net/rfc/nullable_typehints I think it makes sense to keep syntax consistent with subset of Facebook's Hack to not make troubles to each other. I mainly interested in this feature from JIT compiler point of view, because once compiler knows primitive types of functions arguments and return values, it may generate much better code. So the solution must guarantee the types of arguments at function entry point, not the types of actual parameters (they may be auto-converted if possible). Thanks. Dmitry.

« previous php.internals (#76654) next »