3 ms·
By using a GC language you avoid a few of them. By using Rust with a proper framework you should avoid most of them, if not all. A proper type system can save y
by bestouff 3y ago
By using a GC language you avoid a few of them. By using Rust with a proper framework you should avoid most of them, if not all. A proper type system can save your ass very often.
- srgpqt 3y agoEven C has a (simple) type system. The problem is that everyone (especially the standard library) take every opportunity to avoid it, instead casting everything to plain void pointers or char pointers. Thus the compiler can’t do much for safety checks. The good news is that you can build typesafe alternatives on top of the underlying std crap. Would be nice to have a standard <stdstruct.h> that provides common typesafe structs for things like os paths, sql strings, html strings, etc. just like <stdint.h> did for sized integers. I’ve rolled my own typesafe wrappers fo my current C project and it’s been great so far.