News for hackers. Stuff that matters.
Re:Care is needed to use C++ std:optional with non-trivial o... by bluGill on Friday January 13, 2023 @08:20AM (#34367263)
Most languages don't let you reason about such things. You just copy things around with no clue or care if it is fast or slow.

Most problems don't need that level of reasoning, but when it matters C++ gives you a lot of power to ensure you can control when it happens.

Re:Care is needed to use C++ std:optional with non-trivial o... by jay-barronville on Friday January 13, 2023 @08:30AM (#34367366)
I mean, 9x out of 10, the very reason to use a low-level language like C++ is precisely because you want or need to reason about such things, no?
Re:Care is needed to use C++ std:optional with non-trivial o... by bluGill on Friday January 13, 2023 @09:00AM (#34367795)
Hopefully. There are other low level tasks (device drivers) that you might not care, but need C++'s ability to get close to the hardware for, but in general C++ is for when you need both abstractions and the ability to control performance. (Rust, C, ada, and other such languages also play in this space as well, which is best is not something I can comment on)