Hacker News new | ask | show | jobs
by mmcnickle 5000 days ago
I would argue that it's better for configuration and application logic should be separate though. You can run the same appliation with a different XML configuration without modification of the source. You couldn't do the same with in-comment configuration.
2 comments

Wherever this is likely to happen, I wouldn't use annotations. For example, I use YML for environment specific variables.

But I don't need routes or fieldnames to be different only in one environment, so annotations work great there.

Fair enough. Then it sounds like your problem is really with annotations, and not that much about the in-comment part of this.
Yes, and it's not limited to PHP. I don't particularly like how Flask (python) uses decorators for its routing as well.