Add structural comparison

This commit is contained in:
Andrew Morris
2023-06-29 11:05:12 +10:00
parent b2bb618c52
commit 05efdfd517
5 changed files with 206 additions and 10 deletions

View File

@@ -434,6 +434,10 @@ not the subset of ValueScript that has actually been implemented.
- Iterators
- Spread operator on iterables
- Generators
- Structural comparison (not yet for class instances)
- `{} === {} -> true`
- JS: `-> false`
- This is a value semantics thing - objects don't have identity
- Many unusual JS things:
- `[] + [] -> ""`
- `[10, 1, 3].sort() -> [1, 10, 3]`
@@ -468,10 +472,7 @@ not the subset of ValueScript that has actually been implemented.
- Uses `.toString()` to get the source code and compiles and runs it in
WebAssembly
- C libraries, and bindings for python etc
- Structural comparison
- `{} === {} -> true`
- JS: `-> false`
- This is a value semantics thing - objects don't have identity
- Comparison of class instances and functions
- Object spreading
- Rest params
- Async functions