weekly 2024-06-11
Language Update
-
Wasm MVP: Added reference counting support based on the Perceus algorithm to the Wasm1 backend.
-
Syntax:
throw,raise,try, andcatchare reserved as keywords in preparation for the upcoming error handling mechanism. -
Core:
Listandsorted_maphave been moved tocore/immutListhas been moved to thecore/immut/listpackage and is no longer supported as a built-in type.
let a = @immut/list.List::Cons(1, Cons(2, Nil))sorted_maphas been moved to thecore/immut/sorted_mappackage.
-
Core: JSON API has been optimized for better performance and to align with the new Core API.
- New type definitions:
// Types and methods
pub enum JsonValue {
Null
// Previously Boolean(Bool)
True
False
Number(Double)
String(String)
Array(Array[JsonValue])
Object(Map[String, JsonValue]) // Previously @map.Map
}
- JS: Optimized
Int64performance- On the JS backend,
Int64now compiles to twoIntvalues, addressing the previous performance issues with compiling toBigInt. Additionally, the runtime implementation ofInt64in JS has been moved to the core standard library to facilitate open-source community review.
- On the JS backend,
Build System Update
- For moon.mod.json and moon.pkg.json, comments are supported when developing, but comments are not allowed when publishing (only standard JSON format is supported).
IDE Update
- LSP: Function completion now displays parameter names.
