# Book draft: "Control structures in programming languages"

**URL:** <https://discuss.ocaml.org/t/book-draft-control-structures-in-programming-languages/17443>\
**Category:** Community\
**Tags:** book, announce\
**Created:** [November 2, 2025, 5:48pm UTC](https://discuss.ocaml.org/t/book-draft-control-structures-in-programming-languages/17443 "2025-11-02T17:48:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![xavierleroy](https://avatars.discourse-cdn.com/v4/letter/x/a9adbd/32.png) [@xavierleroy](https://discuss.ocaml.org/u/xavierleroy)\
**Post date:** [November 2, 2025, 5:48pm UTC](https://discuss.ocaml.org/t/book-draft-control-structures-in-programming-languages/17443/1 "2025-11-02T17:48:34Z")

</div>

I am happy to announce that a draft of my upcoming book “Control structures in programming languages: from goto to algebraic effects” is now available at [https://xavierleroy.org/control-structures](https://xavierleroy.org/control-structures) .

The book compares several programming languages from the standpoint of control structures. OCaml is used intensively to discuss control in functional programming, including continuation-passing style, control operators, exceptions, user-defined effects and effect handlers, with many examples that I hope you’ll like.

The book also discusses in depth a number of questions that are often raised in this forum, such as the theory and practice of algebraic effects and handlers, and the static checking of exceptions and effects.

Enjoy!

---

<div class="post-metadata">

**Author:** ![jhw](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/jhw/32/1639_2.png) [@jhw](https://discuss.ocaml.org/u/jhw)\
**Post date:** [November 2, 2025, 8:54pm UTC](https://discuss.ocaml.org/t/book-draft-control-structures-in-programming-languages/17443/2 "2025-11-02T20:54:45Z")

</div>

I’ll want to buy that one in hardback when it’s available.

---

<div class="post-metadata">

**Author:** ![kayceesrk](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/kayceesrk/32/1936_2.png) [@kayceesrk](https://discuss.ocaml.org/u/kayceesrk)\
**Post date:** [November 3, 2025, 6:15am UTC](https://discuss.ocaml.org/t/book-draft-control-structures-in-programming-languages/17443/3 "2025-11-03T06:15:25Z")

</div>

Thanks for writing this book @xavierleroy.

Is there a preferred way to send you errata or corrections?

---

<div class="post-metadata">

**Author:** ![avsm](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/avsm/32/6_2.png) [@avsm](https://discuss.ocaml.org/u/avsm)\
**Post date:** [November 3, 2025, 7:09am UTC](https://discuss.ocaml.org/t/book-draft-control-structures-in-programming-languages/17443/4 "2025-11-03T07:09:19Z")

</div>



---

<div class="post-metadata">

**Author:** ![xavierleroy](https://avatars.discourse-cdn.com/v4/letter/x/a9adbd/32.png) [@xavierleroy](https://discuss.ocaml.org/u/xavierleroy)\
**Post date:** [November 3, 2025, 12:45pm UTC](https://discuss.ocaml.org/t/book-draft-control-structures-in-programming-languages/17443/5 "2025-11-03T12:45:22Z")

</div>

Feedback is very welcome ! E-mail is fine (here is [my address](https://xavierleroy.org/contact.html)).
