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

Perhaps somewhat, but it adds an extra layer of (often) unnecessary complexity. This is especially the case which comes up often where you’re interacting with external libraries or even your own internal, older libraries. For example, if you have a vector, and want to pass its contents to a C API that takes a pointer and length. If it’s a vector of raw values/structs, no problem. If it’s a vector of std::optional<Foo> now you’re stuck unless you go through and recopy the whole thing.

That being said, I’ve never found the STLs use of initialized allocation to be a problem, but I don’t work in game design.




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

Search: