The vote failed for arrayof as it is, which was essentially somewhat like generics when used in the context of type hinting.Basically: Foo[] is not going to happen.
This is rather frustrating, as to me there is a bit of a difference between generics and simply asking for an array of things, as most generics require a little setup. We can make a special case for array<foo> and have array automatically handle that template, but it seems weird to force generics to handle this and essentially munge typed arrays and generics in together. Whatever, internals has spoken.
This RFC will likely come back with the Hack-style generics support for PHP 5.7 or PHP 6, so we should probably go with that style.
array<int>array<FooInterface>Foo<Bar>The 3rd there is simply an example of the same syntax working with "weak-generics" and "strong generics later" which is how internals will go - if we add generics at all. If we dont add generics then we still have the syntax for docblocks so yaaaaay for that.
A longer response later but Jennifer, Phil was talking about the rfc on internals. Not PSR 5
--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+unsubscribe@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/5328664A.3090807%40poplarware.com.
For more options, visit https://groups.google.com/d/optout.
1. Generics notation for arrays and collection objects, this discussion
is delayed due to a proposal on internals which may have consequences
for this proposal. There is also the matter that the Generics support of
PHPDoc would not match a complete implementation; there is some
resistance to that.
The wording of your response here, "Nope to SomeInterface[] ... something that definitely will not happen" made me feel like discussion is not welcome for PSR-5, at least in this particular area.
So, rather than presenting my thoughts on this particular part of the PSR-5 spec (and I do have some), I feel like I need to understand a bit more about PSR-5's purpose and decision-making process.
The draft PSR-5 document talks about providing best practices and design patterns that the industry needs for PHP code documentation. The FIG landing page on Github talks about finding commonalities between projects and working together.
So... Let me just ask directly: What is the basis for making decisions on PSR-5? Are the standards proposed in PSR-5 all open for discussion on this mailing list, so that we can find a good standard that the industry can rally around, and that satisfies real needs in the industry, or are they based solely on the current/planned features of PHPDocumentor? Are the ideas and comments of everyone on the list welcome and given consideration, or is discussion closed? Are the opinions and ideas of one person or one organization within the FIG given more weight than others' opinions and ideas?
If PSR-5's purpose is actually just to document what PHPDocumenter is doing or plans to do, then (in my opinion) it shouldn't be a proposed FIG standard -- it should be published as PHPDocumentor documentation. Or at a minimum, the introduction of the PSR-5 document should be edited to say that documenting PHPDocumentor is PHP-5's main purpose (it does not say that now), and then when the standard comes up for vote in the FIG, the voting members of the FIG should consider this when deciding whether to adopt PSR-5 as a FIG standard.
Also, if PSR-5 is actually closed to further revisions, then please do not ask for any more comments -- it is probably time to bring it up for an up-or-down adoption vote by the FIG.
And if PSR-5's purpose is not limited to PHPDocumentor, and it is still open for discussion and revision, then can we continue the discussion about the best way to document arrays of particular classes of objects (and other items in the proposed standard), without unilateral "this cannot happen" comments from anyone?
--Jennifer
I can only encourage you to do so, we can only benefit as community
--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+unsubscribe@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/5328717C.7080100%40poplarware.com.
The vote failed for arrayof as it is, which was essentially somewhat like generics when used in the context of type hinting.
Basically: Foo[] is not going to happen.