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::get
has been introduced as simpler alternative toKMap::data().get().cloned()
.
Libs
- Markdown docs have been added for the extra libs.
random.pick
can now be used with objects and maps that implement@[]
Changed
API
- The use of
CallArgs
has been simplified with the introduction ofFrom
implementations for single values, arrays, and slices.CallArgs::None
has been removed, instead you can pass in&[]
.
- The
run_function
/run_instance_function
methods inKoto
andKotoVm
have been renamed tocall_function
andcall_instance_function
.
Libs
regex.find_all
now returnsnull
when no matches are found.regex.captures
now doesn't add extra by-index entries for named capture groups.map.get_index
can be used to explicitly retrieve groups by index.
Removed
API
Koto::run_exported_function
has been removed. Functions can be accessed viaKoto::exports().get()
and then called withKoto::call_function()
.Koto::run_with_args
has been removed. For equivalent behaviour,Koto::set_args
can be called before callingKoto::run
.
Fixed
Language
- Arguments in paren-free function calls no longer require whitespace after
commas. e.g.
f 1,2,3
would previously be rejected.