Hi Pedro,
I agree with most of the points in your last mail. At the end of the
day, the reasons are fairly subjective, and relate to how the feature
will be perceived, and the freedom to design it without annoying people,
but that doesn't stop them being real.
However I would like to come back on this one:
Pedro Cordeiro wrote on 26/11/2015 11:46:
4) You've suggested disregarding docblock stripping from transpilers
and obfuscators, because they are not first-class citizens, even
though those are part of the PHP ecosystem and affect users.
You're putting words into my mouth there; I never said to disregard the
tools themselves, I disputed that they will be disadvantaged by one
syntax over another.
Transpilers and obfuscators will have to make changes either way, if
they are to support annotations; the nature of those changes is
different inside and outside docblocks, but that doesn't seem that big a
deal to me. Whatever the syntax, they will have to do two things: 1)
parse the source code for annotations, adding them to whatever AST or
similar they use; 2) output those annotations (with any relevant
transforms) in the appropriate syntax. I don't see /** @Foo(42) */ as
fundamentally harder to do that with than << Foo(42) >>, or whatever
other syntax anyone comes up with.
Other than this point, this e-mail is a much better summary of why
docblocks should not be used than any details about which of two
syntaxes (that we haven't invented yet) parsers might or might not find
harder.
As I say, apologies for side-tracking the conversation for so long, I
was intending it to be one decision among many, and wanted to make sure
we'd captured a good reason for the decision, so that it could be
justified in future.
Regards,
--
Rowan Collins
[IMSoP]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php