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

Pedantic, but I assume you're referring to virtual methods?

Ad hoc polymorphism (C++ templates) and parametric polymorphism (Rust) can be inlined. Although those examples are slow to compile, because they must be specialized for each set of generic arguments.



C++ tools can also devirtualize when doing whole-program optimization or tools like BOLT can promote indirect calls generated by any language.




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

Search: