News for hackers. Stuff that matters.
Re:C++ Pattern Matching Proposal [pdf] by DougBTX on Friday January 03, 2020 @11:26AM (#21947309)
Agreed, Rust can certainly handle lazy evaluation. All the iterator types for example are lazy, hence the .collect() method which eagerly evaluates a lazy collection.

Hiding the fact that a lazy value needs to be mutated to initialise it is a little more work (since a nice API lets the user treat the value as if it doesn’t need to be mutated), but is certainly possible.

Re:C++ Pattern Matching Proposal [pdf] by vmchale on Friday January 03, 2020 @03:31PM (#21950003)
> All the iterator types for example are lazy,

It's not proper laziness as defined in Okasaki's thesis/book. One needs more complex things like lazy finger trees.

Re:C++ Pattern Matching Proposal [pdf] by paulddraper on Friday January 03, 2020 @06:39PM (#21951519)
The iterator is lazy.

The language is not.