0.9.0
- Added
$definestatement - Added pipe operator (
|>) - Added compound XOR operator (
~=) - Added optional
globalkeyword and 'implicit-global' warning - Added
@fallthroughannotation and 'unannotated-fallthrough' warning - Added
<nodiscard>function attribute and 'discarded-return' warning - Added 'field-shadow' warning
- Lambdas can now have full bodies by starting with 'do' (e.g.
|a| -> do return a end) pluto_usecan now also be used via@pluto_usein commentsnewoperator now also supports static 'new' function- Deprecated
**operator (use^instead) - Deprecated
letstatement (uselocalinstead) - Deprecated
conststatement (uselocalwith<const>or$defineinstead) - Deprecated
<constexpr>attribute (replaced by$definestatement) - Re-added compile-time concat optimization
- Fixed switch cases being able to jump into the scope of a variable
- Fixed being able to set
nilas a default argument
Standard library:
- Added '*' library
- Added 'cat' library
- Added 'http' library
- Added 'socket' library
- Added 'xml' library
- Added 'bigint' class
- Added 'scheduler' class
- Added os.platform constant
- Added range function
- Added io.contents function
- Added io.relative function
- Added copying variants of existing functions (table.sorted, table.mapped, table.filtered, table.reversed, table.reordered)
- Added table.size function
- Added table.clear function
- Added table.reduce, table.min, & table.max functions
- Added table.find function
- Added table.checkall function
- Added coroutine.sleep function
- Added crypto.generatekeypair function
- Added crypto.encrypt & crypto.decrypt functions
- Added crypto.sign & crypto.verify functions
- Added crypto.sha1, crypto.sha384, & crypto.sha512 functions
- Added crypto.adler32 function
- Added url.parse function
- Added math.round function
json.encodenow supports__orderfor objectsjson.decodenow has an optional flags parameter, they can be combined via binary ORjson.withnullmakes it decode JSON nulls asjson.nullinstead ofniljson.withordermakes it produce__orderfield for objects
- coroutines/threads now have a metatable by default
- base64.encode & base32.encode changed padding parameter's default value from false to true (base64.urlencode is unchanged)
- Fixed crypto.fnv1 & crypto.fnv1a producing incorrect hashes for non-ASCII strings
CLI:
- Added '-c' flag to pluto & plutoc to enable compatibility mode
For integrators:
- Added
PLUTO_READ_FILE_HOOK&PLUTO_WRITE_FILE_HOOK - Added
PLUTO_HTTP_REQUEST_HOOK - Removed
PLUTO_USE_THROWas we now default to using C++ exceptions for Lua errors to avoid breaking RAII semantics. You can still specifyLUA_USE_LONGJMPif you want long jumps.