> I cannot think about an use case, but there should be few.
Once you're used to having them in the toolbox you use them all the time.
> You see it like a problem, I see it like a good practice. You should do whatever you want with code that wasn't meant for something else.
Would you say your classes shouldn't have fields that are third-party library types? Having variants that are third-party library types is just the converse.
> I see this in Python, Ruby and other languages.
I can't speak to Ruby but I have Python experience. springpython is seen as a joke. Python decorators are actual Python functions written in normal Python, not hints to some magic framework that does the actual implementation. Metaclasses are problematic but they don't break the rules of the language to anything like the same extent as happens in the Java world.
Once you're used to having them in the toolbox you use them all the time.
> You see it like a problem, I see it like a good practice. You should do whatever you want with code that wasn't meant for something else.
Would you say your classes shouldn't have fields that are third-party library types? Having variants that are third-party library types is just the converse.
> I see this in Python, Ruby and other languages.
I can't speak to Ruby but I have Python experience. springpython is seen as a joke. Python decorators are actual Python functions written in normal Python, not hints to some magic framework that does the actual implementation. Metaclasses are problematic but they don't break the rules of the language to anything like the same extent as happens in the Java world.