3 ms·
well c++ adds smart pointer etc and it's still memory unsafe, I don't know how else c can be made memory safe without a GC. the UB part should be limited to th
by synergy20 3y ago
well c++ adds smart pointer etc and it's still memory unsafe, I don't know how else c can be made memory safe without a GC.
the UB part should be limited to the minimal set, now there are too many cases to cause UB.
- pjmlp 3y agoAlready making it as safe as Modula-2 (1978) would be a great improvement. - strong typed enumerations - proper arrays with bounds checking (or fat pointers) - proper strings with bounds checking (could be a library like SDS) - memory allocation via types instead of sizeof based math This alone would already fix quite a few problems. Apple has such Safe C dialect they use for iBoot firmware.
- synergy20 3y agoAnnex.K also does safe-c but not adopted by the committee.