Hacker News new | past | comments | ask | show | jobs | submit login

I'm confused how data structures work in this language, and there's no documentation about it as far as I can tell. Is this going to be a Rust-style vectors+iterators system? It it going to use purely-functional concatenative structures? The first example you show invokes `map` and `sum` over an Array, but what is this code actually doing? Making a copy of the data in the array? Creating a mapping iterator?



Rust-style with Vecs+Iterators is the current style, yes. So the map+sum example creates an iterator rather than copying the array.

I'd like to remove iterators in favor of Generators (implemented with Algebraic effects) in the future though since they're much easier to define. Actually switching over is on hold until effects are implemented and speed tests are done to ensure they're compareable speed to iterators (which they should hopefully be due to monomorphisation of effects + handlers).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: