How Rust Was Born? The Story Of A Mistake

Tom Smykowski
3 min readOct 30, 2023

We all know stories about how other programming lamguages were born. But what about Rust?

Rust is the language that surprisingly escaped the Cambrian explosion of programming languages, leaving behind Ada, D and OCaml and more.

Graydon Hoare found a niche in the market of programming languages. He noticed you could write performant systems in crazy C or C++ style, or use Java. A safe, resource hungry beast.

There was nothing in between that was able to fill the void. His initial idea was to solve some major problems of low level programming.

One of these issues is memory safety. In languages like JavaScript you don’t care where your variables and arrays are stored. Nothing bad never happens in that area. If you want to access an array element outside the bounds, you get an error and that’s it.

But the reality for low level programming languages is different.

It’s a constant fight with memory leaks and errors.

C and C++ let you do almost everything. You can for example create an array with ten elements, and read elevent element from that array.

Guess what happened in the standard C, C++ code? You got data from outside of the array. A piece of data that was stored right next to the array.

--

--

Tom Smykowski
Tom Smykowski

Written by Tom Smykowski

Software Engineer & Tech Editor. Top 2% on StackOverflow, 3mil views on Quora. Won Shattered Pixel Dungeon.

Responses (7)