# Could we have a do while loop in Julia?

**URL:** https://discourse.julialang.org/t/could-we-have-a-do-while-loop-in-julia/24795
**Category:** Internals & Design
**Created:** [May 31, 2019, 8:55am UTC](https://discourse.julialang.org/t/could-we-have-a-do-while-loop-in-julia/24795 "2019-05-31T08:55:43Z")
**Posts on this page:** 1
**Showing post:** 9

<div class="post-metadata">

### Author: ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)
#### Post date: [May 31, 2019, 12:01pm UTC](https://discourse.julialang.org/t/could-we-have-a-do-while-loop-in-julia/24795/9 "2019-05-31T12:01:49Z")

</div>

It’s pretty easy to create a macro to give you almost exactly the syntax you’re looking for. For example: [Some useful macros for Julia · GitHub](https://gist.github.com/MikeInnes/8299575) (see `@once_then`) or: [Introducing Julia/Metaprogramming - Wikibooks, open books for an open world](https://en.m.wikibooks.org/wiki/Introducing_Julia/Metaprogramming) (see `@until`, which is a different structure but illustrates the basic idea).

---

_[View the full topic](https://discourse.julialang.org/t/could-we-have-a-do-while-loop-in-julia/24795)._
