# How do you actually find out \*how\* to use an interface in Julia, like the concept of iterator "end"?

**URL:** <https://discourse.julialang.org/t/how-do-you-actually-find-out-how-to-use-an-interface-in-julia-like-the-concept-of-iterator-end/134796>\
**Category:** New to Julia\
**Created:** [December 29, 2025, 7:09pm UTC](https://discourse.julialang.org/t/how-do-you-actually-find-out-how-to-use-an-interface-in-julia-like-the-concept-of-iterator-end/134796 "2025-12-29T19:09:39Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![raman\_kumar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raman_kumar/32/26782_2.png) [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Post date:** [December 29, 2025, 10:23pm UTC](https://discourse.julialang.org/t/how-do-you-actually-find-out-how-to-use-an-interface-in-julia-like-the-concept-of-iterator-end/134796/9 "2025-12-29T22:23:00Z")

</div>

> [@sgaure](#):
>
> Iterators are sort of an exception, in that the compiler/parser/lowering-engine actually rewrites `for` loops (literally) into `while` loops, so this particular interface is in a sense part of the language.

Is there contradiction about `loops` conversion between above and below post?

> [@Understanding iterate() documentation is tough](https://discourse.julialang.org/t/understanding-iterate-documentation-is-tough/134715/4):
>
> Behind the scenes, there’s no such thing as a for loop or while loop. It’s a bunch of gotos in intermediate code, LLVM br-anches, and ultimately native jumps. You can check with Meta.@lower or the @code\_### reflection macros. And no. First, your version omits the iter variable and adds extra stuff like @show, which are generally liberties you should avoid for documentation. Second, the for loop does not create a global variable next or the local variable state/index\*, so it’s obviously not th…

---

_[View the full topic](https://discourse.julialang.org/t/how-do-you-actually-find-out-how-to-use-an-interface-in-julia-like-the-concept-of-iterator-end/134796)._
