~/talk

Kotlin puzzlers, Vol. 2

Talkat Mobius 2018 Moscow · 2018-12-08..12-09· [kotlin]
links:none on file
slides:none on file

Live demo of 20+ small Kotlin surprises with working code and outputs: shows that print returns Unit so weird comparisons compile, a unary minus on a numeric literal can force it into Long (minus applies after literal typing), placing an operator on a new line can turn it into a unary operator, and Kotlin 1.3 sequences are lazy so take(3) yields 0,1,2. Also demonstrates DSL scope leaks and how a @DslMarker fixes them, and that accessing a property in a base-class init prints null — all examples run and explain why.

AI-written summary · about

  1. 0:00Introduction
  2. 2:35What are Kotlin puzzlers
  3. 6:16Print function issue
  4. 8:05Int min and overflow
  5. 14:13Game of Life and operator precedence
  6. 18:27DSL markers and compiler errors
  7. 24:30with function and operator priorities
  8. 31:24Lambdas and closures in loops
  9. 34:22Boolean comparisons
  10. 37:12Delegates and destructuring
  11. 41:11also function and invalid code
  12. 47:59Open classes and cyclic dependencies
  13. 51:13New Kotlin 13 features
  14. 54:09Final puzzle and wrap-up
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.