Re:Imposing memory security in C [video]
by hotjump on Thursday February 27, 2025 @12:00PM
(#43196179)
The problem of C code migration to memory safe languages is that legacy C projects aim for extremely high performance. Garbage-collecting languages would also be safe in any situation, but I want to note that the recent tendency toward Rust derives from its type-system based approach that imposes very few runtimes checks such as bound checking.
I myself hope something like F* gets more attraction in the industry.
[ Parent
| on HN ]
Re:Imposing memory security in C [video]
by pizlonator on Thursday February 27, 2025 @12:08PM
(#43196265)
I hear the perf claim a lot and yet most of the time when I write C/C++ code it's not because it's the most performant. It's either because I'm editing a codebase that's already in C/C++, or I'm using libraries whose best (or only) bindings are C/C++, or because I want to make syscalls (and safe languages don't expose those as nicely as C).
Re:Imposing memory security in C [video]
by rrrix1 on Thursday February 27, 2025 @12:31PM
(#43196477)
For desktop, server, web, mobile, etc. This holds true. Not so much for embedded systems, anything with unnatractive memory capacity or processor performance. Rust is starting to make it's way in, but C and even assembly is still king AFAIK.
Re:Imposing memory security in C [video]
by pizlonator on Thursday February 27, 2025 @12:45PM
(#43196616)
And yet there are embedded systems running JavaScript and Python.
Re:Imposing memory security in C [video]
by kv85s on Thursday February 27, 2025 @06:42PM
(#43199883)
Are there any real-world, production systems based on JavaScript and Python?
Toy systems, yes. Hey, I too, think CircuitPython is really neat. But I'm skeptical someone would base a PLC (or similar) on it.
Re:Imposing memory security in C [video]
by ckcheng on Thursday February 27, 2025 @08:23PM
(#43200556)
Above was talking about embedded systems, and I really don’t know if the James Webb Space Telescope counts, but…
The James Webb Space Telescope runs JavaScript, apparently [1].
[1]: https://www.theverge.com/2022/8/18/23206110/james-webb-space...
That is the usual myth, back when I initially learned C, hobby programmers in Assembly could easily outperform machine code generated by C compilers, that is why books like those from Mike Abrash exist.
C got its performance fame thanks to optimizing compilers that abuse UB semantics.
Microsoft team on .NET, especially the great Stephen Toub blog posts, has been showing off how much performance can be squizzed out of a managed language compiler toolchain when people actually care.
Also lets not forget Apple only moved away from Object Pascal due to an internal team doing MPW initially as kind of submarine project, due to their UNIX roots, and still their focus was C++, not C.