3 ms·
At this point if you stick to a limited subset of C++ and don't go too deep you can get a perfectly safe language which is powerful and performant. If you want
by Arch-TK 6y ago
At this point if you stick to a limited subset of C++ and don't go too deep you can get a perfectly safe language which is powerful and performant.
If you want a safer language with in my opinion a far better type system than anything Rust could possibly achieve at this point you can use Ada.
But why not those two options? Old, smelly and most importantly, difficult to deal with dependencies. You have to actually think about how your API will work in your library because if your library ever ends up used anywhere people are going to be running different versions and you don't want to ruin their day by having them change their code every time they update their machine.
In comes cargo (and friends, lots of other languages have picked up the same idea) where everything is managed by the programming language's choice of build system and API stability and dealing with dependency hell no longer exists when you statically link everything.
I think people don't care or want to care about why we got to where we are (distributions with dependencies and API stability and an aversion to micro-modules). A lot of people just want things to work when you run one command no matter how much complexity gets hidden under the carpet, how obscure the issues end up being and how windows-esque the debugging process ends up being when things do go wrong.
All this pushed by lots of big companies who don't care about the origins of the open source model and how distributions do things and instead only care about lining their own pockets.
Mark my words, distributions will disappear in a few year's time, people will cheer this on as some great technological advancement, things like snap will become the de-facto standard and debugging a complex problem will just never happen again. The internet will become filled with forum posts of how people "fixed" a problem by rebooting their machine or deleting a random file or re-installing.
Anyway, maybe I'm just a crazy person thinking up crazy scenarios and being irrationally scared of "progress".
- c-cube 6y agoIs Ada memory safe in the presence of malloc/free?
- Arch-TK 6y agoHere is a good summary of how Ada deals with safety in the context of memory management: https://news.ycombinator.com/item?id=14216128 https://news.ycombinator.com/item?id=14216128 It's not rust but at the same time I think rust has sacrificed general safety in favor of memory safety which has produced a tendency towards a false sense of security. After all, it seems rust still has memory safety issues despite the borrow checker: https://arxiv.org/pdf/2003.03296.pdf https://arxiv.org/pdf/2003.03296.pdf