Skip to content
0:00 / 0:00

#haskell#laziness#lazyevaluation

Laziness in Haskell — Part 1: Prologue

Tweag by Modus Create

5K subscribers • 25 videos on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Alexis King

Intermediate. Assumes working knowledge.

11K views3 years ago2 recommendations

Programming languagesFunctional programmingHaskellPerformance and optimization

Alexis King explains the mechanics of lazy evaluation in Haskell and how it compares to strict evaluation in other languages.

Laziness is a critical but often maligned aspect of Haskell, and as this video argues, it is frequently misunderstood. In this video, Alexis explains how even strict evaluation in imperative programming languages is not always quite as strict as it seems, and how deviating from strictness can often significantly improve performance. Part 2: youtube.com/watch?v=NCM8pRiLtAc&list=PLyzwHTVJlRc8620PjqbM0x… Series Playlist: youtube.com/playlist?list=PLyzwHTVJlRc8620PjqbM0x435-6-Gi1Gu — Contact: • Tweag Website: tweag.io/ • Tweag Twitter: twitter.com/tweagio • Alexis King's Twitter: twitter.com/lexi_lambda

Why it's here

2 people recommend this

What people say. Highly recommended as a clear and well-presented explanation of laziness in Haskell.

u/lexi-lambdain r/haskell • Recommends

A defense of laziness in Haskell, Part 1: Prologue

u/cxzukin r/ProgrammingLanguages • Recommends

Laziness in Haskell Hi all, There's a series of short videos (currently 4) on laziness in Haskell. Really well presented, clear information (no burritos or other nonsense). Highly recommended for all PLDI'rs interested in seeing from the eyes of Haskell. [video Kind regards, M ✌

u/redchomperSophie Languagein r/ProgrammingLanguages • Mentions

On “Thoughts on laziness”

More direct link: [video Haskell is one of extremely few lazy languages. Mine is another -- mostly -- and I can say it's been some interesting trade-offs. It's probably an unfortunately choice of terminology. There's nothing half-assed about Haskell's evaluation strategy. Even its more-formal predecessor-term "call-by-need" is still wide of the mark because is again focused on *operational* semantics. What's great about a language *like* Haskell is that you can treat the code as having *denotational* semantics and let the computer figure out suitable operational steps. Indeed the GHC does just this. For instance, strictness analysis allows the compiler to find an evaluation order that tol…

u/moon-chilledj, bonsaiin r/ProgrammingLanguages • Mentions

On “Thoughts on laziness”

> More direct link: link to this video That was already posted the other day. This post is to my comments on that video series.

u/bruciferSSS, nomsu.orgin r/ProgrammingLanguages • Mentions

On “Thoughts on laziness”

The original videos that OP is commenting on give a lot of examples of how laziness can allow the compiler to have more degrees of freedom in how it chooses to compile code, which can enable optimizations that aren't possible in strictly evaluated code. The basic argument is that strictly evaluated programs impose more constraints on execution order than the programmer actually cares about, which makes the compiler worse at its job.

u/Brave-Gur5819in r/haskell • Mentions

On “What are the benefits of lazy evaluation?”

I recommend Lexi lambdas videos on the topic: link to this video