<Useful Kotlin Idioms You Should Know> Kotlin was ...
# announcements
u
Useful Kotlin Idioms You Should Know Kotlin was designed to be very similar to Java to make migration as smooth as possible. However, Kotlin was also designed to improve the developers’ experience by providing a more expressive syntax and a more sophisticated type system. To take full advantage of the language and write more concise code, learning Kotlin idioms is a […]
o
I found these issues: 1. Multiple code style issues - missing space between
if
and opening parenthesis, closing parenthesis and opening braces etc. 2. Using
if
,
try
,
when
as an expression warrants declaring the variable as
val
, not
var
. There is no further mutation of the reference in the snippets, official code samples should reinforce the habit of using read only references. 3. The second code snippet in "Null safety" is incorrectly rendered - two code blocks are coalesced, trapping two paragraphs of text in the code block. 4. The Java code snippet in "apply" is not rendered as a code block.
☝️ 1