Re: Annotations in PHP7
| From: | Larry Garfield | Date: | Wed, 25 Feb 2015 04:27:42 +0000 |
| Subject: | Re: Annotations in PHP7 | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-83737@lists.php.net to get a copy of this message | ||
On 02/21/2015 03:35 PM, Pavel Kouřil wrote:
I know you could wrap it in your code, but that would still mean there would probably be multiple implementations of Annotations in the "wild", instead of a good complete functionality in the language itself. I know PHP is not primarily an OOP language, but Annotations IMHO make sense as classes, so I don't see any reason why would it be bad to make them in that way. Also, making Annotations be classes won't magically turn PHP into a primarily OOP language? Regards Pavel KouřilIf you look at the major projects and code in the wild, PHP is a primarily OOP language and has been for years. It's multi-paradigm but OOP is the dominant style in the wild today. And I think mapping annotations to classes is a fine idea, as it means I can very easily document what a given annotations is for (it's a class, document the class), extend it, and build meaningful functionality and defaults using an already well-known syntax and convention. --Larry Garfield