3 ms·
> Reflection is generally a bad idea it is not - dynamic reflection certainly has its issues, but static reflection is absolutely fine > it’s good to be force
by jcelerier 4y ago
> Reflection is generally a bad idea
it is not - dynamic reflection certainly has its issues, but static reflection is absolutely fine
> it’s good to be forced to do without it.
it just leads to people reinventing it even more badly with separate tools
- iainmerrick 4y agoYou’re right, I was just thinking about dynamic reflection. My concern is with fiddly runtime stuff like “instanceof” -- I find that can go wrong in surprising ways. Better to just trust values to implement the interface they say they implement rather than trying to forcibly cast them.