Hacker News new | ask | show | jobs
by nitrogen 3547 days ago
If each state is a function that simply waits for events and returns the next state, the C code doesn't look that bad.
1 comments

It doesn't look bad versus regular C. You still have the C-specific risks in the module and at module interfaces that other language reduce. It's also harder to parse, analyze, and compile in a secure way. With SPARK & formal tools, one can get a strong analysis that the code will always meet the spec. The ability to fully do that for C has only come online in the past few years. It appears to take more work, too.