In my opinion, classic for(;;)
loop is mostly obsolete in kotlin. The only exception is not yet complete API for floating point ranges. For now it is awkward to use.
Both for
used for iterables and while
loops could be replaced by library functions freeing up keywords, so I personally think that i some future release classic for should be completely removed.
As for range downTo
, I am not sure whether it is reasonable to make automatic comparison between borders. It could easily be done, but the way it is now, it prevents some errors that is not easy to track. You can always use step -1
to count down.