By the way, I'm not hating on JVM languages. Both Scala and Clojure have a means to handle this issue with grace and without sacrificing the readability of the code.
By the way, I'm not hating on JVM languages. Both Scala and Clojure have a means to handle this issue with grace and without sacrificing the readability of the code.
@GET
@Path("/users/{userId}")
public Page userPage(@PathParam("userId") UUID userId, @QueryParam("blub-filter") String filter) {
...
}>This kind of annotation hell is indicative of the inflexible and unextensible nature of Java.
This line made me think a lot, it reminded me of this amazing talk by Guy Steele[1], an absolute must for every language developer (or software developer in general, really). It's ironic that he's mostly referring to Java the language itself when he talks about "flexiblity" and "growing the language", where ~10 years later we all know that Java is becoming a messy inflexible deprecation hell. Still a solid talk nonetheless!
sketchy example:
@SerializableTo(name='orders', exclude='json');
@BelongsTo('customer')
private List orders;
then @BelongsTo is implemented using @ManyToMany, @Fetch, @JoinTable.Can you do that with annotations in Java without rewriting them from scratch?