# rangeTo is not intuitive at all

**URL:** <https://discuss.kotlinlang.org/t/rangeto-is-not-intuitive-at-all/6279>\
**Category:** Language Design\
**Created:** [January 18, 2018, 10:07am UTC](https://discuss.kotlinlang.org/t/rangeto-is-not-intuitive-at-all/6279 "2018-01-18T10:07:41Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Konstantin-Khvan](https://avatars.discourse-cdn.com/v4/letter/k/4af34b/32.png) [@Konstantin-Khvan](https://discuss.kotlinlang.org/u/Konstantin-Khvan)\
**Post date:** [January 18, 2018, 4:24pm UTC](https://discuss.kotlinlang.org/t/rangeto-is-not-intuitive-at-all/6279/7 "2018-01-18T16:24:22Z")

</div>

> [@ilya.gorbunov](#):
>
> So, you’re arguing that this range expression should guess its direction

not at all. I’m arguing that `..` looks like magic but does no magic things so why have it? Specifically in for loop case.  
This is about for loop not range expression.

> [@ilya.gorbunov](#):
>
> You can use the well known “goes to” operator from C++ in Kotlin:

So why have for loop in language? Only reason I can see is to prevent trolls from saying ‘`$lang does not even. No for loop for you.`’

In C/Java for loop is specific case of while loop that encapsulates most common iteration pattern and I guess was just inherited from algol like languages.  
And what is the reason for it in kotlin?

---

_[View the full topic](https://discuss.kotlinlang.org/t/rangeto-is-not-intuitive-at-all/6279)._
