4 ms·
Inb4 this thread gets carcinized - While it does sound like Bjarne is being a bit of a sore loser of some popularity contest, he's still right in that exactly
by mxkopy 4y ago
Inb4 this thread gets carcinized
-
While it does sound like Bjarne is being a bit of a sore loser of some popularity contest, he's still right in that exactly memory safety is too specific of an idea to be meaningful in the long term. Personally, I love arbitrary memory access. I can have a Julia server running in linux, expose a pointer address to stdout, pipe it to an SDL renderer, and the whole time be confident in my ability to make it work because it's C all the way down. If these languages were half as anal as say Java about their ideology I'd be downright insulted to use them at all.
C++ is interesting because it's really anal about its semantics, which turns into a sort of anti-ideology. There's comfort in not knowing what the big picture is when the language itself also has no clue, but lets you do whatever you want anyway. The mental weight of having to track lifetimes is just exercise.
Ultimately I think there are attackers and defenders. People who don't mind getting shot and people who do. Why is Bjarne worried about what the defense has to say about him? The N.S.A. (ffs) is simply playing a way different game than, dunno, arch, clang, llvm, Forth, Mathematica, whatever. It doesn't really matter.
- zozbot234 4y agoMemory safety is not "too specific", it's table stakes if you want any kind of logically sound semantics. If you care about logical bugs in a broader sense, you should care about safety.
- mxkopy 4y ago> If you care about logical bugs in a broader sense, you should care about safety. Case in point, ideology. I guess I don't care about bugs as much as I care about product? And I don't really have to, it's not like I get paid for this. Time spent abstracting data iterators >>> time spent memorizing warning flags
- UncleMeat 4y ago> Personally, I love arbitrary memory access. C++ does not really permit this. It is incredibly hard to do type punning from void* without hitting UB. You really are only allowed to access objects through their names according to their lifetimes. Here (https://www.youtube.com/watch?v=IAdLwUXRUvg https://www.youtube.com/watch?v=IAdLwUXRUvg) is a fun talk that involves trying to do a pretty basic kind of arbitrary memory access and concluding that it is simply not possible in C++.
- mxkopy 4y agoFrom my understanding C is really nonchalant about this. The resistance is mostly from the OS side. I'm sure with C++ it's more complicated, but not impossible. With Rust it gets really funny. You have to subscribe to a completely unrelated mental model to read some numbers from a tape.
- hoseja 4y agoToo late! It's RUST EVANGELISM STRIKEFORCE in all it's knee-high pastel-stripe socked glory!