
Ask HN: Do you consider reflection harmful? - StrykerKKD
For me reflection is kind of like a magic trick, because it can hide how the program flows. Kind of like the hat-trick, where the input is the empty hat and the output is the bunny and the how remains a mystery.
======
api
Not at all, but typically languages that support reflection are slower for
very difficult to escape reasons. Chief among these is that such languages are
dynamic, making every function call an indirection (load/call). This forces a
CPU pipeline flush for each function call, etc. It's theoretically possible to
get around this with _very_ smart JITs, but it's very difficult and depending
on _how_ dynamic the language is and how these semantics are used it can have
severe limitations.

------
rwallace
Reflection is like profanity: it has legitimate uses, but excessive and
gratuitous use thereof should be frowned on. Save it for when you mean it.

