4 ms·
>Really, the only memory unsafe languages still in use are C and C++. Ada, Fortran, assembly?
by DeathArrow 3y ago
>Really, the only memory unsafe languages still in use are C and C++.
Ada, Fortran, assembly?
- orwin 3y agoIsn't Ada memory-safe?
- 38529977thrw 3y agothe internet says "it tries to be". http://www.ada-auth.org/standards/rm12_w_tc1/html/RM-13-9-1.html http://www.ada-auth.org/standards/rm12_w_tc1/html/RM-13-9-1.... https://old.reddit.com/r/ada/comments/mme3jk/is_ada_memory_safe/gtsa411/ https://old.reddit.com/r/ada/comments/mme3jk/is_ada_memory_s...
- kjs3 3y agoIn summary, Ada tries to be memory safe by default -- as far as that can be done without requiring automatic memory management and garbage collection -- but deliberate use of "unchecked" language features can break memory safety. In other words, if you go out of your way to use unsafe features, and don't use the features that compensate, Ada is memory unsafe. This has become the goto dismissal of Ada, apparently more popular than "eww...a BEGIN..END language" and "designed by committee/government tainted".
- SAI_Peregrinus 3y agoAda isn't, Ada/SPARK is. That's a subset of Ada, and while it is the main draw of the language for new projects the majority of extant Ada code predates SPARK.
- munchler 3y agoFortran doesn’t even have dynamic memory allocation, so it’s inherently safe.
- julian_t 3y agoIt actually has had this since Fortran-90, and there's even a 'pointer' keyword.
- ok123456 3y agohttps://www.ibm.com/docs/en/xffbg/121.141?topic=attributes-allocate https://www.ibm.com/docs/en/xffbg/121.141?topic=attributes-a... No pointer direct arithmetic, though. If you allocate the memory via allocate, you can inquire if it's been deallocated.
- helsinkiandrew 3y agoFortran is probably as bad as C, and Ada isn't truly memory safe - they link to Ada/Spark which is but that doesn't seem to have much widespread use. https://www.adacore.com/about-spark https://www.adacore.com/about-spark
- KMag 3y agoIsn't Ada/Spark in avionics the main use case for Ada these days? So, huge share of a tiny market?
- helsinkiandrew 3y ago> Isn't Ada/Spark in avionics the main use case for Ada these days? Hasn't it always been? I'm no expert but always assumed that it was used basically military and avionics, and perhaps other safety critical equipment.
- inamberclad 3y agoI think it's also used in high speed rail.
- BirAdam 3y agoAlso weapon systems.
- ocschwar 3y agoFortran is used for scientific computing. The crash of crashing a run on someone's Beowulf cluster is high, but the severity is low.
- jerf 3y agoFortran does not end up where I'm too worried about its security. C and C++ does. At the scale I'm talking about I'm not sure we'd even say Fortran is "in use". Assembly is in use, yes, but in 2023 I feel there is generally an understanding of the risks and I haven't seen the "write everything in assembly" crew in about 15 years. The problem is that there's still too many programmers blithely using C and C++ without realizing the risks and thinking they can cowboy through the problems. For every line of vulnerable, dangerous assembly I bet there's thousands of lines of C or C++. There is also the problem that there have been some big bugs that got through even static analysis and fuzz testing, but I'd still be at least reasonably satisfied if all the critical software in C and C++ would be supported by those tools. Interpreters and compilers have had non-zero error rates too. At the scale I'm talking about, Ada is a non-entity as well. It isn't used. "But it is! I'm a professional Ada programmer!" says someone reading this to themselves. In which case I would say, you darned well know what I mean and don't pretend otherwise just to try to score useless internet points. Ada is not a relevant force on the programming world. That may be sad, but it's true.
- chasil 3y agoSQLite is able to carry most of the justification for C itself at this point. Duplicating the DO-178B certification that it has obtained in an endorsed language will be an incredible burden for any who attempt it.
- steveklabnik 3y agoFerrocene has said in the past they plan on going for DO-178 in the future.
- Xylakant 3y agoBut we do not plan on rewriting SQLite, that much I can say :) (My reading is that the GP points to the exemplary achievement that SQLite has reached a close to (security) bugfree, at what I consider a nearly superhuman effort)
- rollcat 3y agoObjective-C? Plus everything that needs to directly interface with the above languages. So many Python libraries that are one "funny integer" away from a nightmare debugging session.