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

Yes, but when you want to do linked structures, really generic code without repetition or decent compile-time programming, then C++ is very powerful at that.

These things are useful in many situations.



Sure, but I wouldn't say that's easy.


I have found table-generation and processing at compile-time to be of big help.

For example, pre-computing values or parsing at compile-time.

This is useful for example in the following situations:

- You want to embed things at compile-time but keep things apart in a file. This file can be used at run-time when developing but is embedded and literally vanishes (you put your config directly in a struct) when deploying. - You do not want to spend extra time at compile-time. - No need to protect data at run-time with mutexes, etc.

The simplification it can yield is not immediately obvious. It can take a bit more work but the result is worth it. D is more powerful than C++ at this, btw.




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

Search: