4 ms·
Assuming you don't use annotations at all... * DRY for cross-cutting concerns, like database transactions, logging, dependency injection, serialization, valida
by jestar_jokin 11y ago
Assuming you don't use annotations at all...
* DRY for cross-cutting concerns, like database transactions, logging, dependency injection, serialization, validation, web controllers/endpoints... basically, macros for Java.
* Less code means less chance for error - even if that code was generated at some point in the past, it will need to change in the future, and the future developer may do the change manually and might introduce mistakes. Using annotations can help enforce patterns.
- hyperpape 11y agoWe use annotations for some things, but they're either used at runtime for configuration or things like the lovely @Deprecated.
- jestar_jokin 11y agoAnother advantage of using annotations to generate code at compile time, is that any (simple) errors get detected at compile time instead of runtime. So, potentially less tests you need to write.