Hacker News new | past | comments | ask | show | jobs | submit login

I actually ran into a useful case for annotations in Java the other day.

Compile time dependency injection (Micronaut framework).

Not something I have a use for but it's clever.

https://micronaut.io/




It's not exactly a new thing though, it's always been possible in a variety of ways, from build steps to pre-processor macros. Annotations mostly just do what macros or code generators have always done.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: