Re: Re: Improving PHP's type system
| From: | Lin Yo-An | Date: | Sat, 16 Apr 2016 01:02:14 +0000 |
| Subject: | Re: Re: Improving PHP's type system | ||
| 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-92358@lists.php.net to get a copy of this message | ||
I pretty much like the Haskell type system, it let you define types via the
syntax below:
data Tree a = Branch (Tree a) (Tree a) | Leaf a
But the type inference in Haskell can be resolved in the compile-time. We
can only verify the variable type for each function call in PHP.