Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Well the issue is that virtual functions are only costly when they are used an it can (trivially) be determined at compile whether they are in use or not.

On the other hand, you cannot determine if reflection will be used (not, at least without solving the halting problem) and so you have to generate the reflection code for everything.



And what is costly about the reflection code exactly? It is just some static structures with type information and function/data pointers. I fail to see how it can impact performance in anyway. The only side effect will be an increase in binary size.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: