4 ms·
You're confusing safety with stability. Reflection is necessarily unsafe, but not necessarily unstable. You just need to take care about keeping within bounds o
by dtech 5y ago
You're confusing safety with stability. Reflection is necessarily unsafe, but not necessarily unstable. You just need to take care about keeping within bounds of guaranteed behavior.
E.g. in Java calling a method through reflection is guaranteed by the language to work. 100% stable forever.
Reflection also allows you to call internal JVM methods. This might or might not work depending on the JVM, making reflection an unsafe feature. It's still stable on the JVM's is works on though.
- phillipcarter 5y ago> You're confusing safety with stability. Potayto, potahto I guess.