4 ms·
And how do you expose that function globally ? Annotations and CGLib -> reflection nonsense and boilerplate - if you tried that and compare it to something lik
by reader_mode 5y ago
And how do you expose that function globally ?
Annotations and CGLib -> reflection nonsense and boilerplate - if you tried that and compare it to something like a dynamic language with open types (eg. JS/TS) you are just being dishonest if you're saying the two are anywhere close to comparable.
I remember doing a node ORM extension where I just injected standard revision management primitives into the entity as a part of repository. That would take an insane ammount of work in Java in comparison to get the same API functionality (namely it was mostly transaparent to the consumer)
- lenkite 5y ago> And how do you expose that function globally ? Just like anything else. Put it in a package and just static import it from where-ever you need it. Umm, cglib https://github.com/cglib/cglib https://github.com/cglib/cglib is not reflection - its bytecode enhancement. You can inject, create types dynamically, modify types dynamically - all of it is possible. What you just stated is quite straightforward in Java actually and can be fully transparent to the consumer. It's by no means an "insane amount of work". Now, if you bring up hot language features - sum types, etc - I agree that Java falls behind. But the stuff you offered as criticisms, Java actually excels.