"This article was originally published in Polish in issue 4/2013" — a lot of excellent advice. Sad to see C++ have moved in last decade in a direction that makes writing efficient, simple low level code harder and harder :(
Writing clear, concise, and efficient code in C++ has never been simpler or easier. The improvements in C++ over the last 15 years have been qualitative.
So many complex, esoteric, and difficult to maintain incantations that used to be required for efficient code generation are no longer necessary.
That was addressed circa C++17 IIRC, same with all of the technically UB surrounding DMA memory. You needed non-obvious incantations for some use cases but they were expressible. C++23 eliminated most of those incantations. Before all of this you had to use “blessed” incantations that were technically UB but which compilers needed to allow because the code was expressing a valid use case.
I find it crazy that popular systems languages didn’t have an explicitly valid way to deal with all of these ambiguous ownership and lifetime issues around memory until relatively recently.
Can you give some specifics? I feel like this is adjacent to my work and I'm not sure what you're referring to which makes me feel I've missed something important.
Not OP but I believe this is referring to defining a `volatile const` for a read only register which C++ does not allow because you would need to initialize a const. Not sure what the C++17 solution would be
112233 · · focus · HN ↗
jandrewrogers · · focus · HN ↗
So many complex, esoteric, and difficult to maintain incantations that used to be required for efficient code generation are no longer necessary.
112233 · · focus · HN ↗
jandrewrogers · · focus · HN ↗
I find it crazy that popular systems languages didn’t have an explicitly valid way to deal with all of these ambiguous ownership and lifetime issues around memory until relatively recently.
Agentlien · · focus · HN ↗
ab71e5 · · focus · HN ↗