4 ms·
C is alot about portability, not necessarly performance.
by fla 11y ago
C is alot about portability, not necessarly performance.
- j-pb 11y agoIf you only care for portability you can always use one of the billion safe languages whose interpreters are written in C. Lua for example.
- vidarh 11y agoYou may not only care about portability. And "safety" sometimes also means being able to meet realtime requirements, and also often means having the ability to carefully account for resource use in ways that many interpreters does poorly (and no, kernel enforced system limits are not always an option). Many interpreters also make assumptions (e.g. expecting a POSIX'y system) about the host system that many embedded platforms doesn't necessarily meet. I've more than once looked at interpreters for embedding and found most of the alternatives sorely lacking. Very few interpreters are well suited for embedding on constrained platforms at all (Lua, admittedly is probably one of the more solid exceptions). And once you start having to write lots of support code in C to port or sandbox your interpreter of choice, the reason for considering an interpreter quickly becomes less compelling.
- fla 11y agoCause it would add an extra layer to my solution, which might be more complicated to get right than just bare C.