Re:Union Types have been accepted for PHP 8
by cutler on Sunday November 10, 2019 @12:56AM
(#21496641)
Considering PHP's pseudo-Java verbosity I wouldn't exactly classify it as a fast-to-develop language. Doc-block comments are an abomination if you come from Ruby,Python or Javascript and if you follow the numerous PSRs to the letter you're lucky if you can fit a couple of lines of real code on a screen surrounded as they will be by space-wasting blank lines, doc-block annotations and KR-style braces.
[ Parent
| on HN ]
Re:Union Types have been accepted for PHP 8
by melicerte on Sunday November 10, 2019 @04:49AM
(#21497290)
I guess you have not read the post you are commenting. One of the rationale behind union types is to reduce the doc-block comments. It is also, I believe, one of the idea of introducing a stronger type system in PHP.
From the original post: [quote] Supporting union types in the language allows us to move more type information from phpdoc into function signatures, ... [/quote]