Koto 0.14
Koto 0.14 has been released, bringing API improvements and improved library documentation.
Koto?
Koto is a free and open-source programming language with the goal of being an ideal scripting language for Rust applications.
If this is the first time you're reading about Koto, for some background information you could take a look at the About Koto page, or you could check out the language guide.
Changes in 0.14
Added
API
KMap::gethas been introduced as simpler alternative toKMap::data().get().cloned().
Libs
- Markdown docs have been added for the extra libs.
random.pickcan now be used with objects and maps that implement@[]
Changed
API
- The use of
CallArgshas been simplified with the introduction ofFromimplementations for single values, arrays, and slices.CallArgs::Nonehas been removed, instead you can pass in&[].
- The
run_function/run_instance_functionmethods inKotoandKotoVmhave been renamed tocall_functionandcall_instance_function.
Libs
regex.find_allnow returnsnullwhen no matches are found.regex.capturesnow doesn't add extra by-index entries for named capture groups.map.get_indexcan be used to explicitly retrieve groups by index.
Removed
API
Koto::run_exported_functionhas been removed. Functions can be accessed viaKoto::exports().get()and then called withKoto::call_function().Koto::run_with_argshas been removed. For equivalent behaviour,Koto::set_argscan be called before callingKoto::run.
Fixed
Language
- Arguments in paren-free function calls no longer require whitespace after
commas. e.g.
f 1,2,3would previously be rejected.