3 ms·
> Those two, yes (and vectors really only apply -as such- in C++), but the rest? It depends (the best answer to every conundrum). I think other systems langs m
by leshow 6y ago
> Those two, yes (and vectors really only apply -as such- in C++), but the rest? It depends (the best answer to every conundrum).
I think other systems langs make the distinction, Rust does also, this is what I've been doing at my day job lately.
> That means, that, in over thirty years of writing software, I have encountered exactly 0.000000 binary trees.
I've been doing it for a third of that time and I've encountered binary trees and all kinds of other data structures a bunch of times. I don't do any big data or ML stuff, I was writing React frontends for about half of that, the last few years it's been systems programming with Rust; I still encountered these types of structures writing JS though.
> BTW: Binary trees and linked lists can be an issue in parallel-type programming. We had some image processing algorithms we did that used similar structures, and we had to be very careful. We often had to back out optimizations.
When sharing any memory between threads or tasks you have to be careful, I'm not sure there's anything special about binary trees or linked lists. Consequently Rust makes this sort of thing very nice.
I'm not sure how to respond to the rest of the comment. Personally, I'll take an expressive type system over a comprehensive unit test suite.
I'm not discounting your personal experience but I find it hard to believe you aren't encountering these types of problems, unless you are but just not noticing it. Curious about what kind of 'optimized' (optimized for what?) code is 'the worst'?
edit: I just re-read this and realized the tone was a little aggressive, I don't mean to come across that way, my bad.
- ChrisMarshallNY 6y agoI also apologize if I came across aggressively. I ran a C++ shop for 25 years. We wrote “pipeline” software for image processing. REAL heavyweight data processing/DSP stuff. Optimizations were crucial, and we often took advantage of things like GPUs, and threading. There be dragonnes... I learned that explicit threading is a scary place, full of surprises. Nowadays, I write in Swift (which I love -I think that Rust is similar). Explicit threading is barely supported, which is just fine, by me. I can get defensive, because I have been treated rather badly, simply because of my age. No one ever bothers to look at my portfolio. They just start with the condescending drivel, sometimes, even accusing me of “faking” ten years of commit history, hundreds of thousands of lines of code, dozens and dozens of repos, hundreds of pages of articles, documentation, prose, and training modules. It was exactly this kind of behavior that convinced me to not even bother trying to get work. I’m not arrogant. I’m actually a really decent person; warm, compassionate, and a great team member. My LinkedIn profile is jammed with testimonials. I worked on a team with some of the finest engineers and scientists in the world, and had their complete confidence and trust. But that doesn’t mean a thing, if I can’t give a proper answer to a “Draw Spunky” test.