Safety is an Ecosystem: History Rhymes

The programming language RUST is in the news recently, with articles that are recursive(1)

  • RUST: We have learned lessons from C++. We address the fundamental memory thread safety issues!
    Back 15 years
  • C++: We have learned lessons from C. We have improved memory cleanup and dangling pointer issues!
    Back 30 years
  • C: We have learned lessons from FORTRAN. We have a cleaner, more efficient syntax with better memory management
    Back 45 years
  • FORTRAN: Dang, assembly is hard and not portable, let’s use a human-readable language
Languages: Beyond Embedded

The basic narrative is accurate, but it misses a larger point in software development. It takes an ecosystem to adopt languages.

Ecosystem building blocks

For a language to be adopted, there are 5 basic building blocks that need to be present and qualified(2)

  1. Standardized language syntax: The syntax of the language needs to be formalized and stable(3). All downstream tools are dependent on this first part.
  2. Qualified compilers: Compilers exist that are verified to translate the language into a ‘correct’ hardware implementation. Large-scale adoption requires support for multiple silicon targets
  3. Coding standards: In C / C++ this often means the MISRA guidelines. It represents the distilled ‘best practices for safety.
  4. Supporting tools: A collection of tools such as style guide checkers (for 3), code coverage tools, debuggers, testing infrastructure (e.g. xUnit…), OS integration…(4)

The Apex Predator: Experienced Developers

No matter how good the language or the tool chain is, until a critical mass of experienced developers exists to support development, the language will not take off. This is one of the reasons why new languages often start off with smaller projects that require smaller teams.

Languages as Invasive Species

The software development environment is a crowded field with multiple languages competing for use. Even within the embedded domain, where only a subset of modern languages are used, the competition is fierce. RUST has some good features, but only time will tell if it thrives or becomes a footnote in the history of embedded languages(5)

Footnotes

  1. As a side note: safety systems should avoid recursion
  2. The cost of qualifying tools is significant! Until a language builds up a critical “mass” of real-world use, companies and vendors will not invest in developing the tools.
  3. This is a frozen version of the language that companies can depend on not changing for on the order of ~3 to 5 years. Further, there is an expectation that future iterations of the language will be backward compatible.
  4. A ‘full’ set of supporting tools doesn’t need to be present, but until they are, it is difficult for companies to adopt a new language.
  5. The initial list of languages above is a small subset of what has been part of the embedded landscape. Dropping things such as ADA, OCCAM, COBALT, and many more.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.