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

>>but for some reason people like to count it as code bloat

Again, used code being generated is counted as bloat. This, I can't understand.



Isn't code bloat "defined" as code that is unnecessary? If it's used, it's not unnecessary. In C# with generics, the JIT compiler will generate seperate code paths for List<int>, List<double>, List<string>, etc. in order to speed up execution. The only difference with C++ templates is that it affects the executable size and is done before hand instead of at runtime (or ngen time).




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

Search: