4 ms·
It seems that (a) we need Dynamic features (introspection, dynamic dispatch) and (b) we need to use it sparingly. In short, it's a _cultural_ problem, not a tec
by Tloewald 10y ago
It seems that (a) we need Dynamic features (introspection, dynamic dispatch) and (b) we need to use it sparingly. In short, it's a _cultural_ problem, not a technical one.
I suspect the solution is something as simple as a "DangerouslyCallMethodByName" method.
- mahyarm 10y agoyou could do if let method = classInstance.methods[methodKey] { //Put some ugly method argument checker thing here method.execute() } It would be typesafe, not dangerous, and statically typed.