News for hackers. Stuff that matters.
Re:The Fixed Point: Laziness, Recursion and Fixed Points in ... by dan-robertson on Saturday June 12, 2021 @07:31PM (#27488358)
Laziness in haskell is a weird issue. It makes compilation harder and it makes it much harder to predict a program’s performance, or the global performance impact of a local change (eg a change might be locally good but change to no longer evaluate so many things at once, deferring that evaluation to happen when it is more expensive—because eg the compiler can’t inline or there is no cache efficiency). Indeed Peyton Jones has said that the next haskell [family language] would be strict.

On the other hand, it allows for many programs to be written in nicer, more direct and declarative ways. As well as allowing for weirdness like in this article. But maybe a lot of that is more coming from code transformations enabled by purity and something like clojure-style lazy sequences (or strict if they are finite) plus aggressive inclining and stream fusion would be sufficient.

Re:The Fixed Point: Laziness, Recursion and Fixed Points in ... by andrepd on Saturday June 12, 2021 @09:46PM (#27489075)
The answer is simple: make strictness the default and laziness opt-in, by giving a keyword/operator to turn something into a lazy thunk.
Re:The Fixed Point: Laziness, Recursion and Fixed Points in ... by whateveracct on Saturday June 12, 2021 @09:53PM (#27489109)
Laziness being the default means libraries compose better though.

I quite like how Haskell does it now, and reasoning about its performance honestly isn't bad. And that's worn GHC optimizing like crazy (which is actually what makes Haskell performance wonky to think about - not laziness.)

Re:The Fixed Point: Laziness, Recursion and Fixed Points in ... by dan-robertson on Sunday June 13, 2021 @06:55AM (#27491523)
Agreed. The laziness seems to only be useful when it is pervasive. Having only a little laziness isn’t so difficult from having none at all (eg OCaml has optional laziness but it is hardly used at all)