I also just had this idea: ``` for (x in y) { ...
# language-proposals
b
I also just had this idea:
Copy code
for (x in y) {
    // Code that might break
} else if break {
    // If the loop exited via a break
} else if !break {
    // If the loop exited normally (no break)
} else {
    // If the loop was never entered
}
๐Ÿ˜ˆ 1
๐Ÿ™ˆ 2
m
benleggiero: Crazy idea.
b
I figured it was pretty out there, but worth bringing up ๐Ÿ™‚
a
Copy code
inline @InlineOnly @InlineOnlyAndIMeanIt fun<R> tentacles(collection: Iterable, body: ()->R, ifBreak: ()->R, ifNBreak: ()->R, elze: ()->R): R {
// ...
}
๐Ÿ‘ 3
j
wow, that's a mean piece of Kotlin code
b
XD I see! It'd be cool to see that fleshed out, especially the
@InlineOnlyAndIMeanIt
annotation ๐Ÿ™‚
a
@InlineOnlyAndIMeanIt(Severity.SERIOUSLY)
๐Ÿ˜€ 2
๐Ÿ˜‚ 1
m
Developers are
fun creatures()
.
b
fun creatures(with: Crazy<Ideas>)