Skip to content

1.29.0 Release

Choose a tag to compare

@dwgebler dwgebler released this 25 Jun 16:25
  • Numeric literals now support scientific notation. Unsuffixed exponent
    literals are exact decimal values (1e3, 1.5e-3, 2E8); add f for
    IEEE 754 floats (1e308f).
  • Enums can now be backed by scalar string or int values:
    enum Status: string { Active = "active"; }. Backed variants expose a
    read-only .value, EnumName.from(value) returns the matching variant or
    throws, and EnumName.tryFrom(value) returns the variant or null.
    Backing values must be unique literals, and variants cannot mix backing
    values with associated data.