Drew Devault, known for creating the user environment SWAY, the ARC postal client, and co-developing Sourcehut, recently announced the release of hare 0.24.2. This versioning format follows 0.yy.q, where yy represents the last two digits of the year, and q indicates the quarter. Hare is positioned as a programming language that is similar to C but easier to use. The compiler and tool source code are distributed under the GPLV3 license, while the standard library is under the MPL license (Mozilla Public License). The language is specifically designed for tackling low-level tasks like developing operating systems, compilers, network applications, and system utilities, requiring high performance and precise implementation control.
Hare emphasizes manual memory management and a static type system that demands explicit variable typing. The runtime supplied for application execution is minimal, and the standard library includes functions for accessing operating system interfaces, common algorithms, protocols, encryption, regular expressions, and more. To facilitate the development of graphic applications, tools like hare-wayland, gtk, vulkan, opengl, sdl2, and libui are also provided.
In the latest version of hare 0.24.2, several enhancements have been made:
- Added support for the NetBSD operating system, expanding compatibility beyond OpenBSD, FreeBSD, and Linux.
- Introduced new syntax for iterating over elements in arrays and slices using the “for-each” cycle. For example: let items = [1, 2, 3, 4, 5]; for (let item .. items) {FMT::Println(item)!;};
- Enabled the declaration of optional parameters for functions, with values set during function definition. For instance, FN Example(X: Int, Y: Int = 34) VOID = {// …}; Example(12); // Equivalent to Example(12, 34);
- Boosted the performance of the bufio module and related APIs that involve buffering/output, such as UNIX::resolvconf, unix::hosts, and unix::passwd.