4 ms·
If being non-typesafe is a turn-off they should not be using C++. They should be using Go, Rust, or some other memory-safe language with better type safety. Th
by api 2y ago
If being non-typesafe is a turn-off they should not be using C++. They should be using Go, Rust, or some other memory-safe language with better type safety.
The latest crazy Windows IP stack RCE pushed me wholly over into the "nothing new should be written in C/C++" camp. It's clear that secure reliable software can't be done in these languages, at least at scale.
The macho counter-argument of "but I can do it!" doesn't work. Maybe you can. It doesn't matter. Code will be worked on by more people than just you if it lives for a long time. Code "rots" and acquires bugs, and having the compiler catch the worst ones (memory errors, type errors) is a huge win.
- jenadine 2y agoIf only there was an existing gui library as mature at Qt4 written in these languages, so they could fork it.
- api 2y agoThere are some good Go and Rust UI frameworks they could contribute to, but that would mean contributing to a common goal rather than forking endlessly.
- ranger_danger 2y agoeven safer languages like rust still do not prevent against many problems, such as: logic errors, stack overflows, out of memory errors, bitflips, memory leaks, unrecoverable errors (panic's), memory safety related issues in an unsafe context
- api 2y agoIt's like saying seat belts, air bags, and crumple zones do not prevent all automobile deaths. They don't, but they help a whole lot. Prevention of all bugs converges with artificial superintelligence and/or solving the halting problem (which is impossible). There are formal languages that do more than Rust, but they're a lot less practical. Working on making a more practical one would be a useful exercise. You can forbid unsafe at the Cargo.toml level in Rust. You can also just search a project for the keyword "unsafe" to subject all unsafe code to extra levels of scrutiny. Some orgs set commit rules where commits containing "unsafe" must be approved by more people or must pass through a security audit team.
- IshKebab 2y agoThat's not quite true. Stronger type systems such as in Rust, OCaml and Haskell do help prevent logic errors. Also Rust can provide very precise control over memory allocation so that can help with OOMs. No language that I'm aware of protects against bit flips or claims to have memory safety in its memory unsafe escape hatches (kind of the point).
- timeon 2y agoHonestly, what is your point?