3 ms·
I agree with the author of this article. In general this is more about implicit functionality at the language level. Why is that much different from implicit fu
by coding123 9y ago
I agree with the author of this article. In general this is more about implicit functionality at the language level. Why is that much different from implicit functionality we get at the library level. In Java, when I use JPA, I am depending on massively loaded meaning behind a set of annotations... @OneToOne @ManyToOne, etc... at runtime you best know what all of those annotations are. I haven't really seen anyone that LOVES JDBC complain about tools like Hibernate/JPA. Yet it gives us lots of implicit meaning when we write this code that someone NOT familiar with JPA would be going crazy about - until they learn it.
To go a bit further and just state that suddenly it's NOT OK at the language level is kinda argumentless in my humble opinion.
And yes, there are degrees of acceptability. If JPA had an annotation like @OMGWTFBBQ and ActiveRecord supported something similar - it would be rejected. JPA and ActiveRecord do things like this, but much of the rest of these tools features outweigh their faults. I know for sure there are many Java frameworks that actually love it when you write your own annotation.
For example I use a @NoAuthentication annotation in Jax-RS. There is no standard annotation for that, yet in our company we all use it and know what it means. We mark this REST service as a service that anonymous users or authenticated users can call alike. This is because we favor a model of placing our authentication code inside the stack (in our case CXF) rather than adding code at EACH rest method. It's a very VERY implicit style, we can't look at and adjust our authentication model, but just the same, we SHOULDN'T be trusted to change our authentication model in each method.
Annotations are not exactly the same as implicits in other languages, but it's the closest example of something in Java that makes our lives much easier and hides a LOT of explicit info.