0.4.0 contains 145 commits from 28 contributors!
Release blog post (highlights only).
Documentation
This release includes many documentation revisions, fixes, additions and gaps closed!
Language
- Add
continuekeyword for loops - #822 - Add
askeyword:import "..." for Name as OtherName- #775 - Add Support positive sign in scientific notation - #706
- Add Fiber.try(value) to complement Fiber.call(value) - #835
- Allow
.to be on a different line (for fluent/builder APIs) - 4c496c5 - Allow newlines in empty parameter lists - #925
- Add raw strings using triple quotes
"""- 981ea4a - Add
\eescape character for strings - #963 - Add Attributes to classes and methods - #962
Modules
- Random: Random.sample optimizations - #716
- List:
- Num:
Fixes
- Fix stack corruption related to
Fncalls - #807 - Fix a byte offset bug in CODE_IMPORT_VARIABLE - 28ad8aa
- Fix some stack corruptions related to multiple wrenInterpret calls - #730
- Fixed crash when GC collects module during import 2ce421e
- Fix
Bool,NumandNullallowing subclassing, which is invalid - #831 - Fix config reallocateFn being required, it can now be left out as intended - 33ab8be
- Fix returns in a constructor returning null, and disallow returning a value - #845
API
- BREAKING: Add
userDatatowrenReallocateFn- #788 - BREAKING: Add
WrenLoadModuleResultwhich has aonCompletecallback, allowing freeing module strings - #778 - Add
wrenGetVersionNumberfor external access via the API - #958 - Add WREN_API prefix for correct dll exports for some compilers - a501fba
- Add
wrenHasVariableandwrenHasModulequeries, for use withwrenGetVariable- 182ca90 - Add
wrenSetListElementto complementwrenGetListElement, and allow negative index for both - 97ebcc7 - Add Map functions to API - #725
- wrenSetSlotNewMap
- wrenGetMapCount
- wrenGetMapContainsKey
- wrenGetMapValue
- wrenSetMapValue
- wrenRemoveMapValue
Other
- build; add util/generate_projects.py for regenerating project files
- vm; Allow computed goto when using clang on Windows
- vm; WREN_MAX_TEMP_ROOTS default is 8 (instead of 5)
- vm; GC debug times are printed in milliseconds, not seconds