Skip to content

Instantly share code, notes, and snippets.

@antonioribeiro
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antonioribeiro/2501efa5467572a92ab5 to your computer and use it in GitHub Desktop.
Save antonioribeiro/2501efa5467572a92ab5 to your computer and use it in GitHub Desktop.

##What’s wrong with Annotations in PHP

####App logic and structure expressed in COMMENTS, which is enchanting for beginners (Look’ma no PHP, magic!), but terrible for real development. We are developers, we write and debug code. But Annotations is a COMMENTS parser. I really don’t want to debug any string based parser instead of my code. COMMENTS should be just, well..., comments!, not a source of truth!


People may see a really big difference between DocBlocks and comments, but as a matter of fact they are comments, block comments. If they were not supposed to be comments, then they should have completely changed the delimiters, which, I know could be a problem to the compiler...

Block comments in PHP are C & C++ block comments:

/* */

And the difference between them and DocBlocks is a single asterisk:

/** */

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment