Draft:Hare (programming language)

Hare is an imperative, statically typed system programming language created by Drew DeVault.

The language began development in December 2019 and was initially released on April 25, 2022. Hare aims to be a lightweight, type safe, and intuitive alternative to C.

Goals
The goals of Hare's design are:


 * To create a "conservative" successor to C, offering polish with minimal bloat.


 * The ability for any single programmer to fully understand the Hare toolchain.

Not a C replacement
According to its creator, Hare does not intend to replace C in all its areas of application: "Hare is not a “kitchen sink” language: Hare does not attempt to solve every problem, but it does strive to solve the problems we’re interested in well."

[...]

"Hare aims to be successful within its niche for the programmers that find its ideas compelling, and nothing further. [...] I was pretty frustrated to see the “Hare is a C replacement” mantra repeated in the media despite issuing no such claims." – Drew DeVault, on the goals of the Hare programming language

Hare gears itself towards an audience which shares its creators' philosophy of hygienic programming.

Description
Hare is intended to offer an alternative workflow for C programmers. It is designed for low-level systems programming, marketing itself as simple, stable and robust. The language features a static, inferred type system as well as manual memory management. Hare's innovations upon C include full UTF-8 support, a tagged union based error handling system and a context-free interpreter. The language emphasises broad applicability and portability.

Hare runs on Linux, as well as all BSD operating systems.

A lightweight language
The Hare compiler is lightweight, with the language as a whole geared towards portability, requiring only 1.4MB of storage. Hare utilises the QBE compiler tool, unlike many modern programming languages which utilise LLVM. It also aims to minimise reliance on external dependencies.

Drawbacks
The language lacks many features present in other C alternatives the likes of Zig or Rust, such as code evaluation at compile-time. Hare also does not, nor does it plan to in the future, natively support functionality on proprietary operating systems such as MacOS and Microsoft Windows, though there exist third-party dependencies that provide such support.

The most widely criticised aspect of Hare is its complete lack of generics, requiring developers to implement their own basic data structures, such as the hash table.

Multilingual HelloWorld
This example demonstrates the high-level nature of Hare's syntax and its inferred type system.

→ The official Hare website offers a short tutorial course.