Hacker News new | past | comments | ask | show | jobs | submit login

> It's what one would do themselves without generics, if they wanted to be able to use them with full speed.

Right, but in many cases they can be combined without much speed penalty. For example you can combine monomorphized functions when you only rely on methods that are expected to be costly and inlining has a negligible effect. With actual, not ad hoc, generics you may (hopefully) have a control over monomorphization---I think Rust's trait object is a good design for this reason.




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

Search: