ta0kira / zeolite

Zeolite is a statically-typed, general-purpose programming language.
Apache License 2.0
18 stars 0 forks source link

Create a random-access data structure. #77

Closed ta0kira closed 3 years ago

ta0kira commented 4 years ago

Probably in a library. The only reasons to make it a built-in would be to allow random-access literals (like int x[] = { ... }; in C++) or to use them in other built-ins. I really don't want to deal with the syntactic idiosyncrasies.

There should probably be a mutable interface and a builder. The builder so that a full structure can be created in an initializer, and mutability so that algorithms (like sorting) can operate on them.