> Assignment is not an expression. We've written 20K of production Kotlin code without this ever being a useful convention.
Out of curiosity, what is the idiomatic way of writing an input loop? The C/Java way would be something like
int bytesRead = 0;
while ((bytesRead = in.read(buf)) != -1) { // ...
> The ?: operator is great when chaining a bunch of operations all of which could return a null which we want to convert to a default. Here is an example: claimData?.claimTimeMinutes?.toLong() ?: 5LI think the author is referring to the ternary operator, not the elvis operator.