Hacker News new | ask | show | jobs
by drivingmenuts 5000 days ago
Any editor that starts with comments collapsed is going to hide the functionality buried in comments. But that's a minor issue.

Comments are exactly that - comments. They are not intended to be executed and can be changed or removed at will. They are not necessary. They exist to provide further explication for code that is not self-documenting (or just plain programmer wankery).

This changes the deal. This means that some comments are required without providing clear boundaries to those who are not cognizant of the new convention.

PHP would be better served by adding naked @annotations and leaving comments to be non-parsed.

1 comments

The examples in the annotations RFC that he links to actual use C# style attributes syntax:

  <Attribute(Value)>
  public class Sample { }
I think that's a better approach as it makes the annotations an actual language construct and keeps them out of comments.