Kuroko 1.4.0b1
Pre-release
Pre-release
This is Kuroko, a dynamic, bytecode-compiled, interpreted language with significant whitespace and familiar syntax.
For a complete tutorial and sample code, please visit kuroko-lang.github.io.
If you believe you have discovered a bug in this release, please file an issue report here on Github or join #toaruos on Libera.chat to discuss the problem.
This is a beta release.
What's new in 1.4.0
This release features major changes to object construction and more compatibility with Python.
Object Construction
- The object construction process has been rewritten to conform more closely with the Python object model.
__new__is now supported.- New opcodes have been added to support running class bodies in a custom environment.
- Metaclasses are now supported.
__init__is now expected to returnNone.__init_subclass__is now supported.__class__can be reassigned in some cases.
Syntax Improvements
- Function signatures now support
/(end of positional-only arguments) and*(start of keyword-only arguments) *and**expansions are now supported in list, set, and tuple, and dict expressions, respectively.
Standard Library Updates
set.updaterange.__contains__ceil,floor,truncfunctions from themathmodule can now returnlongvalues where appropriate.functionobjects now expose theirCell-typed upvalue cells.staticmethodandclassmethodcan be applied to native (C) function objects.__bool__is now supported.
C API
- API changes to support
__new__will necessitate downstream changes in C extensions. krk_isSubClassis now exposed and may be used to check a single subclass relationship.krk_parseArgsnow supports?to determine if an argument as provided,:to override the function name displayed in exceptions, float conversion forfandd- Kuroko can now be built with float support disabled, using
KRK_NO_FLOAT. - The
STATIC_ONLYdefine has been renamed toKRK_STATIC_ONLY. - Kuroko can now be built with a fixed memory tagging value to support ARM MTE on Android. Specify
KRK_HEAP_TAG_BYTE=0xb4when building for this functionality.
Bug Fixes
- Various issues were fixed in this release and backported to 1.3.1. Please see the release notes for 1.3.1 for a complete list.