Language Update
-
Wasm MVP: Added reference counting support based on the Perceus algorithm to the Wasm1 backend.
-
Syntax:
throw
,raise
,try
, andcatch
are reserved as keywords in preparation for the upcoming error handling mechanism. -
Core:
List
andsorted_map
have been moved tocore/immut
List
has been moved to thecore/immut/list
package and is no longer supported as a built-in type.
let a = @immut/list.List::Cons(1, Cons(2, Nil))
sorted_map
has been moved to thecore/immut/sorted_map
package.
-
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: Optimize
Int64
performance- On the JS backend,
Int64
now compiles to twoInt
values, addressing the previous performance issues with compiling toBigInt
. Additionally, the runtime implementation ofInt64
in 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.