# What is the meaning of: while false end

**URL:** <https://discourse.julialang.org/t/what-is-the-meaning-of-while-false-end/69507>\
**Category:** General Usage\
**Tags:** question\
**Created:** [October 10, 2021, 11:15am UTC](https://discourse.julialang.org/t/what-is-the-meaning-of-while-false-end/69507 "2021-10-10T11:15:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![eliascarv](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eliascarv/32/22152_2.png) [@eliascarv](https://discourse.julialang.org/u/eliascarv)\
**Post date:** [October 10, 2021, 11:15am UTC](https://discourse.julialang.org/t/what-is-the-meaning-of-while-false-end/69507/1 "2021-10-10T11:15:34Z")

</div>

I’ve seen this line of code used in some packages and Julia source code:

```julia
while false end

```

I assume it’s used for precompilation, but I’m not sure.  
Could someone explain what the purpose of this line of code is?

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [October 10, 2021, 11:35am UTC](https://discourse.julialang.org/t/what-is-the-meaning-of-while-false-end/69507/2 "2021-10-10T11:35:39Z")

</div>

Linking [related PR](https://github.com/JuliaLang/julia/pull/42128#issue-988503590).

---

<div class="post-metadata">

**Author:** ![eliascarv](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eliascarv/32/22152_2.png) [@eliascarv](https://discourse.julialang.org/u/eliascarv)\
**Post date:** [October 10, 2021, 11:38am UTC](https://discourse.julialang.org/t/what-is-the-meaning-of-while-false-end/69507/3 "2021-10-10T11:38:33Z")

</div>

Thanks @rafael.guerra !

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [October 10, 2021, 11:44am UTC](https://discourse.julialang.org/t/what-is-the-meaning-of-while-false-end/69507/4 "2021-10-10T11:44:45Z")

</div>

What does it mean to “disable the interpreter”?

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [October 10, 2021, 12:01pm UTC](https://discourse.julialang.org/t/what-is-the-meaning-of-while-false-end/69507/5 "2021-10-10T12:01:25Z")

</div>

@leandromartinez98, you replied to me but that is something far beyond my knowledge!

May be that shortcut code does not get interpreted and goes straight to compilation & execution?

---

<div class="post-metadata">

**Author:** ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Post date:** [October 11, 2021, 1:13pm UTC](https://discourse.julialang.org/t/what-is-the-meaning-of-while-false-end/69507/6 "2021-10-11T13:13:27Z")

</div>

Just as you can either choose to execute `sin(1.0)` “the normal way” or with

```julia
using JuliaInterpreter
result = @interpret sin(1.0)

```

so too Julia comes with its own built-in interpreter as an alternative to the compiled execution pipeline. There’s a heuristic for deciding which pipeline to use (all this happens behind the scenes so you don’t see it). But occasionally you need to control which one gets used, hence the PR.

---

<div class="post-metadata">

**Author:** ![eliascarv](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eliascarv/32/22152_2.png) [@eliascarv](https://discourse.julialang.org/u/eliascarv)\
**Post date:** [October 11, 2021, 3:01pm UTC](https://discourse.julialang.org/t/what-is-the-meaning-of-while-false-end/69507/7 "2021-10-11T15:01:57Z")

</div>

I didn’t know Julia had an interpreter. How does it work?

---

<div class="post-metadata">

**Author:** ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Post date:** [October 11, 2021, 3:05pm UTC](https://discourse.julialang.org/t/what-is-the-meaning-of-while-false-end/69507/8 "2021-10-11T15:05:39Z")

</div>

Pretty much the same way the external one, JuliaInterpreter, does. The built-in interpreter doesn’t have the foundations needed to build a debugger, hence the external one; the external one is also [documented](https://juliadebug.github.io/JuliaInterpreter.jl/stable/), including some pages focused on explaining the inner workings.

In the long run, it might make sense to try to share as much infrastructure as possible, but I think there’s some ground work to lay first (we probably want a more efficient representation of lowered code for execution).
