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

That's the issue with C++ metaprogramming. It's so unwieldy and complex that the benefits are difficult to see and the occasions to be worthwhile limited. When the language has better (i.e. simpler) facilities for meta-programming like D, it will open big venues where it makes sense to use it. It is like programming object oriented in C, it is possible to do but so unwieldy and requiring discipline and verbose boiler plate that there's rarely an occasion where it would be interesting to use. While it is much easier to do in C++ or D or Java (etc.) as they provide the abstractions that makes it useable. C++'s meta-programming facilities are not good enough.


I disagree. Object-oriented programming is very easy in C even though the syntax itself doesn't guide you. Essentially, all C code I write is object-oriented. Perhaps you are thinking about dynamic dispatch which indeed is very annoying to implement correctly in C?




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: