3 ms·
"There are some platforms (such as embedded systems) where C really is the only choice. " That's never true. You can always use a higher-level, safer language
by nickpsecurity 10y ago
"There are some platforms (such as embedded systems) where C really is the only choice. "
That's never true. You can always use a higher-level, safer language that can compile to C. The result is C code but you never write it & avoid its pitfalls. Ivory language in Haskell, Ada-to-C, and Modula-2-to-C come to mind. Alternatively, you can use something even more primitive in a C subset or native assembly that it compiles to. OcaPIC or JavaCard come to mind. Astrobe Oberon is another for safe, low-level coding but not sure how its compiler works.
- adrianN 10y agoAdding an extra compilation step doesn't make debugging easier. The embedded C compilers also aren't known for their stability and standards compliance, so you'd likely have to massage your generated C to avoid bugs in the C compiler.
- nickpsecurity 10y agoThose are good points worth considering for a given tool.