Re: Naming of 'weak' type hints
| From: | Christoph Becker | Date: | Mon, 30 Mar 2015 16:30:06 +0000 |
| Subject: | Re: Naming of 'weak' type hints | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-85562@lists.php.net to get a copy of this message | ||
Zeev Suraski wrote:
> One thing that I think we should change is how we refer to the ‘weak’ type
> hints. The word ‘weak’ has a negative ring to it, and considering this is
> how the language behaves across the board it’s a pretty bad name for this
> feature.
> Personally I think we should go for ‘dynamic’ when we document it, as this
> is the common way to refer to this behavior (dynamic languages). We could
> also consider going for ‘lax’ or ‘lenient’ as the opposite of ‘strict’,
> although I think we can easily do without introducing a new word into the
> vocabulary here.
It appears to me that all of these suggestions may hide the fact that
the arguments are converted to the hinted types. So perhaps "converting
type hints" might be a good name.
Then again, the respective declare directive is called "strict_types",
so maybe it's best to speak of "non-strict type hints".
--
Christoph M. Becker