3 ms·
I never know that, but still, the point stands: making a comment necessity for code to function properly is bad, bad, bad. That's why the Java folks throws it o
by bertzzie 14y ago
I never know that, but still, the point stands: making a comment necessity for code to function properly is bad, bad, bad. That's why the Java folks throws it out right?
- masklinn 14y ago> I never know that, but still, the point stands: making a comment necessity for code to function properly is bad, bad, bad. Not really. > That's why the Java folks throws it out right? I'm not sure what that's supposed to mean. "Java folks" don't throw anything out, Sun introduced a better and better-supported mechanism for doing what javadocs were coerced into doing.
- bertzzie 14y ago> I'm not sure what that's supposed to mean. "Java folks" don't throw anything out, Sun introduced a better and better-supported mechanism for doing what javadocs were coerced into doing. I mean the Java community didn't use it anymore, because the "annotation inside comment" thing is worse than "annotation supported natively by the language". Granted, it's the only practical way to do it in PHP for now, but it still didn't change the fact that it's bad, IMO. I wonder why SensioLabs (the creator of Symfony and Doctrine) didn't make the PHP's annotation RFC into reality. They are a quite huge powerhouse in the PHP world...
- deleted 14y ago[deleted]
- masklinn 14y ago> No, Java uses the same syntax with annotation inside comments. Mostly incorrect, these are javadoc annotations which usually aren't used by code (aside from the javadoc extraction tool that is, and sometimes code editors for the @deprecated javadoc tag) Since java 5, java has notations as language syntax e.g. /** * Some javadoc comment */ @Annotation public void someMethod() { // stuff } http://docs.oracle.com/javase/tutorial/java/javaOO/annotations.html http://docs.oracle.com/javase/tutorial/java/javaOO/annotatio... which are supported by a formal extraction framework and are syntax- and type-checked by the java parser itself, and attached as metadata to classes and methods by the same. Before java5, these were inside comments (alongside javadoc tags), fully processed by third-party tools and had no support from the JVM itself.
- masklinn 14y ago> I mean the Java community didn't use it anymore, because the "annotation inside comment" thing is worse than "annotation supported natively by the language". Sure, unless you don't have "annotations supported natively by the language". > Granted, it's the only practical way to do it in PHP for now Indeed. > I wonder why SensioLabs (the creator of Symfony and Doctrine) didn't make the PHP's annotation RFC into reality. They are a quite huge powerhouse in the PHP world... They might be a powerhouse, but they still aren't the drivers of PHP itself, Zend is. They can ask for the RFC to be finalized and implemented but at the end of the day, they also need to ship. And probably to ship on more versions than a hypothetical future 5.5.