野兔 0.24.2 已发布

  • 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.

    • Compatible with qbe 1.2: Compatible with version 1.2 of qbe.
    • Learn about Hare: Hare is a systems programming language with a simple and robust design using a static type system, manual memory management, and a minimal runtime. Learn more here.
  • 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.
阅读 9
0 条评论