@wwwwwwwwww you have been hell-banned and I dont see anything particularly offensive in your immediate comment history. > is there any reason to add lazy evaluation to c++ [...] I think you are suffering from a misapprehension. Nothing is being added to C++ the language. This is just an implementation of lazy streams in C++14. Think of it as an optional 3rd party library. > lazy evaluation is one of those features wh…
Second example say you want to compute (x + y) * z - w where each of them are long vectors but want to keep the look of the code readable and explicit. Naive way to do it will create lots of temporaries and unnecessary loops. Every binary operation is going to create a temporary (and entail a loop). But if you have laziness you just need one loop. Can you elaborate on this? Why can laziness provide better code here?
2. loop: (x[i,...,n] + y[i,...,n]) * z[i,...,n] - w[i,...,n]
although I don't think the loops are going to be the main overhead in this case.