3 ms·
There's a theory that C programs are better designed from an implementation perspective and from a feature perspective precisely because it's so difficult to wo
by dkarl 3y ago
There's a theory that C programs are better designed from an implementation perspective and from a feature perspective precisely because it's so difficult to work with. The cost of implementing architectural complexity is so high that people put in extra thought and effort to discover the simplest design that can possibly work, which means better-understood and more reliable systems.
Same thing with features. Fewer, better-vetted features mean more secure systems.
C encourages better, simpler designs, but at the cost of making it nearly impossible to write safe code. Garbage-collected languages remove entire classes of errors, but they make it easier to implement lazy, unnecessarily complex designs.
Maybe Rust offers the best of both worlds? (I say this mostly but not entirely tongue in cheek.)
- renox 3y ago> Maybe Rust offers the best of both worlds? (I say this mostly but not entirely tongue in cheek.) AFAIK Rust's solution for tree/graph is to replace pointers by indexes. IMHO this is worse because if you get it wrong with pointers you may have a core, with indexes you just get silently the wrong node..