5 ms·
If we are playing that game, why stop there? why not ASM? Better yet, why don't you be a real developer and use a magnet?
by omeid2 3y ago
If we are playing that game, why stop there? why not ASM? Better yet, why don't you be a real developer and use a magnet?
- megous 3y agoBecause most people want portable programs, whithout having to rewrite them for each target. C helps a lot in this respect, compared to assembly.
- omeid2 3y agoGo on then, tell me which platform you can't use Rust or at least C++ when you can use C with standard library?
- megous 3y agoWhy would I do it? You compared C to asm, not rust.
- throwawayEmb 3y agoNot sure what you mean by “with standard library”, but STM8 has no C++ or Rust compiler that I know of. For other MCUs where you do get C++ support, you often only get C++98. Replied to your other comment about this as well.
- omeid2 3y agoYou're not going to be able to run Libwebsockets on STM8, so not sure why that platfrom matters? Also, if you're not sure what “with standard library” in the context of C programming means, start here: https://en.wikipedia.org/wiki/C_standard_library https://en.wikipedia.org/wiki/C_standard_library
- throwawayEmb 3y agoPerhaps I read your statement too literally. If we are only talking about targets able to run libwebsockets unmodified, STM8 is of course irrelevant. That assumption was not clear to me though. Many embedded code bases do not have a 100% standard-conforming libc and e.g. miss I/O functions like fopen and friends (because there is no file system). And at that level, you will sometimes only get compilers for C (or older C++ dialects).