flofriday / Moose

🐐 A new fun programming language
MIT License
6 stars 1 forks source link

Mutating collection types #26

Closed flofriday closed 1 year ago

flofriday commented 1 year ago

Example

l = [1, 2]
l.append(3)
print(l) // [1, 2, 3]

Note

This is quite tricky for the typechecker, since we don't have generics but lists and dicts are generic datastructures.