Hare 0.26.0 released
55 points by runxiyu
55 points by runxiyu
Aaaand upgraded in Alpine Linux edge
I thoroughly enjoyed working with Hare when I played around with it last year. It is great to see progress being made and the UX being improved.
I do wonder if Linear types (or similar) will ever make their way in to Hare. As things are today, Hare feels quite close to its goal with error handling, but lacks a language-level construct for managing resources. It is usable as-is, but I wonder if it could be made even better.
Hare is a systems programming language designed to be simple and robust
Maybe I'm missing something obvious, but it seems like two of the main features added in the release make the language more complex (explicit support for leaving memory uninitialized), and less robust (ignoring errors looks the same as ignoring any other return values).
Or is there a different POV from which these additions help make the language more simple or robust?
Playing the developer advocate: if you want the right amount of simple and robust (while still being expressive enough to be pleasant to use), it is probably a good idea to start with something very simple and robust, and gradually add less-simple and less-robust features if you observe that their absence strongly hurts usability. (I would imagine that it is harder to start with a pleasant system, and gradually remove or simplify features to make it more simple and more robust.)
The most simple and robust programming language has exactly one possible program. It's written do nothing, and it does nothing.
What that description means is that when making design decisions that offer a tradeoff between simplicity/robustness and other things like expressiveness and efficiency, Hare errs very far on the side of simplicity/robustness compared to other languages. And it very much does! The question (and perhaps you were implicitly asking this) is whether Hare will remain far on that side, or if it will become complex by gradually accumulating features that are tempting in isolation.
Is there a concise language overview for someone well-versed in programming language theory/implementation jargon? Preferably no more than a couple of paragraphs. I envision something like: (disclaimer: don't know if this is accurate!) "Hare is a lexically scoped imperative, procedural language with product types (structs) and sum types (tagged unions), unrestricted (but guaranteed non-NULL) pointers, namespaces, and a Go-style defer statement. Functions are closed (i.e. top-level, no lambda functions). Memory management is manual without static memory soundness guarantees. The implementation is compatible with the C ABI and thus has a seamless C FFI."
Something like this would be very useful for a particular audience for evaluating the language!
I haven't seen exactly the overview you're asking for, but this one is at least adjacent:
https://harelang.org/documentation/faq.html#how-does-hare-compare-to-other-languages