Skip to content

Conversation

Sainan
Copy link
Member

@Sainan Sainan commented Aug 23, 2025

  • Added postfix ++ operator
  • Added ** as an integer exponentiation operator (this previously was a deprecated alias for ^)
  • Added protected class fields
  • Added $object syntax for table creation
  • Added $include
  • Added $haltcompiler
  • Trailing commas are now allowed for arguments, parameters, and destructuring
  • String interpolation now implicitly calls tostring on each interpolation value
  • Deprecated the optional 'global' keyword

Type System:

  • Added any and nil type hints
  • Added type hinting for multiple return values
  • Added complex type hinting for tables to specify fields
  • Type hints for function type can now also specify the parameters and returns
  • Added $type syntax for named types (this replaces the constexpr call $type(x))
  • Added $declare to set the type of a global
  • Added $getproptype to query the parser's idea of a variable's type

Standard Library:

  • Bigint
    • Added bigint.abs, bigint.gcd, bigint.isprobableprime
    • Added bigint.export, bigint.import
    • Added __unm metamethod to bigints
  • Crypto
    • Added curve25519 to crypto.generatekeypair
    • Added crypto.hmac
    • Added crypto.fnv1a32
    • Added crypto.x25519
    • Added crypto.derive
    • Added RSA OAEP modes to crypto.encrypt & crypto.decrypt (rsa-sha1, rsa-sha256, rsa-sha384, rsa-sha512)
    • Added optional offset parameter to crypto.decompress
  • FFI
    • Added ffi.callback [DOCS NOTE: This does not work when W^X is enforced by the platform.]
  • IO
    • Added io.unique
    • Added io.symlink [DOCS NOTE: Requires admin privileges on Windows]
  • JSON
    • Added MessagePack support to json.encode and json.decode
  • Math
    • Added math.trunc, math.cbrt, math.hypot
    • Added math.inf as an alias for math.huge
  • OS
    • Added os.dnsresolve [DOCS NOTE: Unavailable under Android and WASM]
  • Socket
    • Added alpn option to socket.starttls
    • Added early_data option to client-side socket.starttls
  • String
    • Added string.span
  • Table
    • Added table.create [DOCS NOTE: This is from Lua 5.5]
    • Added table.clone
  • UTF8
    • utf8.offset now also returns the final position of the codepoint [DOCS NOTE: This is from Lua 5.5]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant