Is Roc lazy or strict? I've found a couple of references to an explicit lazy
function (in the Parser
module) so I'm guessing the latter, but it's not mentioned in the FAQ.
I would also be interested in the reason behind the direction given (whathever it is).
Hi @Maldus512, Roc is strict, but it's still possible to build lazy things on top of a strict language, which is what I believe happened with the Parser
. There are quite a few downsides to adding lazy evaluation to a programming language. @Richard Feldman has mentioned before that he considers laziness in haskell to be a mistake but I'm not sure what he considers to be the key drawbacks.
I see, thank you!
I'd be very interested to know more on this choice, especially if it was driven more by performance or semantics concerns. Again, I guess performance is the driving factor since in absence of side effects the order of evaluation is not particularly meaningful.
Last updated: Jul 06 2025 at 12:14 UTC