Is there something equivalent to C/Java’s for(;;){}
infinite for-loop syntax?
I know that while(true){}
is an infinite loop, but does Kotlin have anything similar to C/Java’s with the for
keyword?
I tried fo(;;){}
but it resulted in a compiler error in the IDE.
Note: I think that C/Java syntax for infinite for-loops is highly unreadable compared to while(true){}
, I’m just purely curious if Kotlin has alternative syntaxes for infinite loops as well.
submitted by /u/ED9898A
[link] [comments]