# What is the programming pattern with multiple if else branching

**URL:** https://discuss.ocaml.org/t/what-is-the-programming-pattern-with-multiple-if-else-branching/17591
**Category:** Learning
**Created:** [December 12, 2025, 2:24am UTC](https://discuss.ocaml.org/t/what-is-the-programming-pattern-with-multiple-if-else-branching/17591 "2025-12-12T02:24:52Z")
**Posts on this page:** 1
**Showing post:** 27

<div class="post-metadata">

### Author: ![c-cube](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/c-cube/32/1727_2.png) [@c-cube](https://discuss.ocaml.org/u/c-cube)
#### Post date: [December 15, 2025, 6:48pm UTC](https://discuss.ocaml.org/t/what-is-the-programming-pattern-with-multiple-if-else-branching/17591/27 "2025-12-15T18:48:19Z")

</div>

Well I [suggested](https://github.com/ocaml/ocaml/issues/9033) to add the actual control flow structures in 2019 and nobody was interested 🙃. I still think it’d be great to have proper imperative control flow structures… But at this point the core language is mostly frozen, isn’t it? We’re not going to get Rust’s `loop`, or [`if let`](https://github.com/ocaml/ocaml/pull/194), or break/continue, or [safer syntax](https://github.com/ocaml/ocaml/pull/715).

I wonder if there’d be a nice way, in the status quo, to tell the compiler about our intent, like `[@tailcall]` did. Something like an attribute that emits a warning if a local exception does allocate or leak.

---

_[View the full topic](https://discuss.ocaml.org/t/what-is-the-programming-pattern-with-multiple-if-else-branching/17591)._
