4 ms·
> I've worked as a C++ developer. Most of my peers didn't understand the "fundamentals". They didn't know a map was implemented as a binary tree, for example. T
by John23832 2y ago
> I've worked as a C++ developer. Most of my peers didn't understand the "fundamentals". They didn't know a map was implemented as a binary tree, for example. They didn't understand struct packing. The list goes on an on.
And even if you do know the fundamentals, for a vast majority of programming, you don't need to care.
How often does the average programmer need to care about the underlying mechanism a map? How often do they need to care about struct alignment? Etc.
> C++ allows for quite a bit of abstraction letting people be quite productive without understanding much about the machine. People look up the API in the standard library and they just use it like they would any other language.
Rust similarly does... it just yells about the specifics of the abstractions.
- BeetleB 2y ago> How often does the average programmer need to care about the underlying mechanism a map? I think it's useful to know it's not an O(1) lookup as many programmers seem to assume. Definitely useful to know it is ordered. Also, I once ran out of RAM (over 80GB), because of all the extra pointers needed in a tree. I switched to a sorted array and used a binary search instead - got the same performance, without running out of RAM.
- com2kid 2y ago> How often does the average programmer need to care about the underlying mechanism a map? How often do they need to care about struct alignment? Etc. It is important to know the big O performance of an underlying data structure if it is being used for a non-trivial number of elements. And struct alignment I've had to worry about many times in my career, especially when passing structs between platforms or languages. So for most of my career, these have been important issues. (Though I'll admit between starting my career in compilers and then doing embedded, the first half of my career was fairly biased towards the low level details!)
- John23832 2y ago> So for most of my career, these have been important issues. I appreciate what you're saying, but your career is an outlier. The VAST majority of programmers/software engineers are gainfully employed without knowing any of these things.