Re: Type hinting
| From: | Lars Schultz | Date: | Thu, 27 May 2010 20:34:33 +0000 |
| Subject: | Re: Type hinting | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-48533@lists.php.net to get a copy of this message | ||
Hi,
I have only recently started listening in on this list and I usually find it quite interesting. This one especially so.
But I think it's going nowhere...forgive me for saying so. I believe that those of you, who'll have a say in this decision, have already made their minds up and they can't come up with arguments to convince the other party...
Maybe it'd help to summarize those arguments in a few concise words instead of lengthy paragraphs, if that's even possible. Also it'd be nice to know the exact goals of this new syntax, be it strict- or autocast- types.
Goal of typed scalar function parameters:
+ Type-Safety within function (granted by both)
+ Self-documenting Code (granted by both)
+ ...
Pro strict-type-enforcing:
+ Precise Errors/Warnings
+ Prevents data-dependent errors
+ ...
Pro autocast-type-hinting:
+ Code-readability/compactness
+ Convenient
+ The PHP-way
+ ...
Feel free to add any arguments to the list...;)
Cheers
Lars