v0.11.0
- Breaking: Changed (fixed) the execution order of function calls
x(y, z)
fromy, z, x
tox, y, z
- Breaking: Replaced automatic wrapping of functions inside objects with instance calls
- Calls in the form of
x.y(z, w)
will turn intox.y(x, z, w)
conceptually at compile time wherex
will only be evaluated once - If
x
isglobal
orCapitalized
then it will not transform into an instance call - Caching an object's method will no longer automatically bind the method to the object
person.greet(); // ✔️ const greet = person.greet; greet(person); // ✔️ greet(); // ✖️ will not pass the instance to the method
- Calls in the form of
- Breaking: Writing values to objects will no longer attempt to write to something in the prototype chain when the key doesn't exist
- Breaking:
__get
and__set
metamethods have been replaced by proxy objects - Breaking: Replaced
params MondValue[]
withparams Span<MondValue>
everywhere - Made
.mnd
file extensions optional inrequire()
- Added an
export
modifier to make creating modules easier// Math.mnd export fun add(x, y) -> x + y; export const pi = 3.14159; export * from MoreMath; // merge another module's exports into this one
- Added an
import
statement to make it easier to use modulesimport Math; // or... from Math import { add }; // or... from 'Math.mnd' import { add };
- Added support for function syntax inside of object literals
const obj = { method() { // ... }, fun methodB() { // ... }, seq methodC() { // ... }, @decorator fun methodD() { // ... } };
- Optimized increment/decrement operation when the result is not needed