Hare aims to be a 100 year language
This week on The Changelog weâre joined by Drew DeVault, talking about the Hare programming language. From the website, Hare is a systems programming language designed to be simple, stable, and robust. When we asked Drew why he created it, he said â[because] I wanted it to exist, and it did not exist.â Wise words.
We discuss Hare (of course), why heâs so passionate about all things open source, the state of the language, fostering a culture that values stability, and oddly enough â what it takes to make a peanut butter and jelly sandwich.
Matched from the episode's transcript đ
Drew DeVault: Yeah, so Hare is a systems programming language, and it compiles down to machine code, and you can use it for a whole lot of low-level use cases for that reason. Iâm writing this kernel with it, and weâre doing a bunch of other stuff along those lines of that.
[00:24:02.29] It has a syntax which comes from the C lineage, it has braces, and it has those fixed expressions, these kinds of things you would expect from a C derivative syntax like JavaScript, Java; these are similar syntaxes. And it gives you the tools you need to do a lot of the same stuff C does. So it can feel like you have the power of C, but it also has 50 years of hindsight that C didnât, and so it has a lot of features which kind of address paper cuts in the space that C is occupying right now. We have better error handling through tagged unions; that feels very comfortable to use, so you can write more robust code more easily. We have things like slices, which is a sorely missing feature from C. We have better string support, and we have a handful of safety features - nowhere near what Rust does, for example, but things that were sorely missed for C programmers⌠And we let you take the training wheels off as well. So if you need to do something in a kernel context, writing a driver with unsafe memory patterns, itâs easy to do that in Hare.
And then we also have a standard library for Hare, which is, in my opinion, significantly better than C. I think one of the [unintelligible 00:25:13.01] parts of C is the standard library, and with 50 years of hindsight and a bunch of other languages for inspiration, we were able to come up with something a lot better.