Live data from Hacker News

The Hare programming language

harelang.org

1–10 of 323 posts

Re: The Hare programming language

#4
post #3

I don't see any explanation of why this language exists. Does it do something better than any other language?

My two cents: low-level programming languages (e.g. with manual memory management) are essential for tasks like writing operating systems, video games, real-time audio applications and other such things. There are few low-level programming languages available currently. The most used is C, and while it has its wonderful parts, C can also cause a lot of headaches and bugs. Whether C++ is a good replacement is a can of worms I won't get into.

Hare attempts to improve upon C while still remaining a very simple language, with much better error handling, support for arrays and slices, a rich but still minimal standard library, more concise and powerful function return values using tagged unions, improved memory safety, and other things you can find here:

* https://harelang.org/blog/2021-02-09-hare-advances-on-c/

* https://harelang.org/tutorials/introduction/

Disclaimer: I worked on Hare and this is just my personal opinion. I hope everyone can judge whether or not they like Hare for themselves by playing with the language!

Re: The Hare programming language

#6
post #3

I don't see any explanation of why this language exists. Does it do something better than any other language?

It's difficult to compare Hare to every other language project at once, but the rationale is ultimately the same: we think we can fill different niches than the others.

If I were to speak generally about Hare compared to other efforts, I would focus on its simplicity and stability goals. It's the only new language in this space that's arguably simpler than C, in my opinion, and the goal is to provide a small, stable foundation that can be depended on for a long time, much like C is. Unlike many other languages in this space, its trade-offs also tend to position it to do anything C can already do - Rust has famous issues with linked lists, ownership when linking to things like libwayland, and they have their hands full getting into Linux; Go's runtime and GC rules it out for many applications; and so on.

Re: The Hare programming language

#8
post #7

How does this compare to Zig? They seem to share the same problem space.

Hare is much simpler than Zig and has a much different design, things like Zig's comptime is absent in Hare. Hare also has, in my opinion, a more fleshed out standard library than Zig. However, they don't compete in some respects: Zig targets nonfree platforms like Windows and macOS, and being based on LLVM gives Zig a greater range of platforms/architectures OOTB.

Andrew might be able to expand on this.

Re: The Hare programming language

#9
post #8
post #7

How does this compare to Zig? They seem to share the same problem space.

Hare is much simpler than Zig and has a much different design, things like Zig's comptime is absent in Hare. Hare also has, in my opinion, a more fleshed out standard library than Zig. However, they don't compete in some respects: Zig targets nonfree platforms like Windows and macOS, and being based on LLVM gives Zig a greater range of platforms/architectures OOTB. Andrew might be able to expand on this.

Gotcha. One thing that I really liked about Zig is its effortless interop with C. How does Hare compare in that regard?
Post reply on HN