Skip to content


Subversion checkout URL

You can clone with
Download ZIP

Safe languages

Lucretia edited this page · 1 revision
Clone this wiki locally

There are a number of microkernel's written using some random custom languages, why is this?

This seems to me to stem from people thinking that they must implemented an OS with C because that's what they did for Unix (back in the 1970's).

  • But C is not safe, it is easy to miss a closing brace and not see it because your editor did a bad job of indenting it, or the code goes over many pages and it's just hard to see it!
  • It's too easy to write a for loop that indexes an array outside of it's bounds.
  • It's far too easy to write to a random pieces of memory that your application does not own, causing a segfault (or similar).
  • C compiler's cannot catch errors in your code for you, it will keep processing until it finds something that matches and then spews out a ton of errors that don't make any sense.

So, these people then decide to create a safe C but leave in the same unsafe constructs, e.g. being able to assign an int to an enum and vice versa, they're supposed to be different types!

There are others who don't implement a Safe C but rather prefer some other weird language of their design, I've seen Lisp based languages that fall into this category.

I don't really understand this unless it's an urge to scratch a language design itch. Just start with a safe language, in my case this is Ada, a stripped down version of the language but still one which is safer than those above.

Something went wrong with that request. Please try again.