Release Information: Hare 0.24.2 released on July 14, 2024 by Drew DeVault. It has new language features, improvements to the standard library, and breaking changes.
Release Highlights:
- NetBSD support: Added support for NetBSD thanks to Mallory Adams. Expands platform support to include all three major BSD derivatives and Linux.
- for-each loops: Added by OpenBSD maintainer Lorenz. Allows iteration over slices/arrays and using pointers. Also introduces the “done” type for first-class iterators. Example usage in reading lines from a file.
- Optional function parameters: Functions can define default values for optional parameters. Many standard library functions updated. Example in strconv.
- Improvements to bufio performance: Max Schillinger, Jose Lombera, and Lorenz worked to improve bufio performance by eliminating memory copies. Several standard library modules depending on bufio also refactored.
- Multiple alternation for regex::: Max Schillinger added support for multiple alternation in regex::, completing POSIX Extended Regular Expressions implementation.
- Shared memory and memfd support: Drew DeVault expanded support for shared memory constructs. shm_open et al implementation available for all supported platforms. memfd support added for FreeBSD and Linux.
Breaking Changes:
- “done” type: “done” is now a reserved word. Several standard library symbols updated to use done types. If programs match on functions using the iterator pattern with “void” and get errors in 0.24.2, rewrite with for-each loop or replace “void” with “done”.
- bytes::tokenize: Now accepts multiple single-byte delimiters and removes support for multi-byte delimiters. strings::tokenize accepts multiple ASCII delimiters.
- Unix API overhauls: unix::hosts, unix::passwd, and unix::resolvconv APIs overhauled. Programs depending on them may need to be refactored.
- Time changes: time::date now accepts a zone offset parameter. time::date::calculus renamed to time::date::rflag. time::date::realize requires.vloc to be set. time::date::now() renamed to time::date::localnow() and time::date::nowutc() to time::date::now(). Several constants renamed. time::chrono::eq removed and replaced. time::chrono::mzone renamed to time::chrono::ozone. type of time::date::parsefail changed. Several format layout constants renamed.
- strconv changes: “b” family of functions removed. Remaining functions accept desired base as an optional parameter.
- Removed modules: crypto::bcrypt and format::tar removed from standard library and placed in the extended library.
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。