News for hackers. Stuff that matters.
Re:Ante: A low-level functional language by skavi on Friday June 17, 2022 @10:34AM (#31778807)
In the case of map operations, Ante is using Rust style iterators over collections. In Rust, iterators are just as fast as loops.

The author said somewhere else in the thread they want to switch to generators implemented with effects eventually.

Re:Ante: A low-level functional language by deltaonefour on Tuesday June 21, 2022 @09:48PM (#31831177)
This makes sense. So basically if you style your programming such that a list is never materialized you can achieve zero allocation based programming.

However for things like "sorting" this can never fully be achieved. You cannot sort a generator. Every iterator counterpart needs a list counterpart or there will be literally certain computations that are impossible.