Re: [RFC] Scalar Type Hints v0.2

From: Date: Thu, 15 Jan 2015 21:18:56 +0000
Subject: Re: [RFC] Scalar Type Hints v0.2
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  Groups: php.internals 
Request: Send a blank email to internals+get-80594@lists.php.net to get a copy of this message
The main advantage of the two syntaxes: 1. Strict function bar(int $num){} 2. Weak function bar((int) $num){} Any junior-middle PHP developer, seeing this syntax in the code can understand how it works, without studying the documentation and without your complex conversion tables. Explicit is better than implicit, is the motto Python, here it is very relevant.

« previous php.internals (#80594) next »