~/talk

Scala Best Practices I Wish Someone'd Told Me About

TalkinFrenchat ScalaIO 2018 · 2018-10-29..10-31· [developer-experience]
slides:none on file

Practical Scala coding tips covering concrete pitfalls and fixes: check parity with n % 2 == 0 to handle negative integers, detect NaN using .isNaN, avoid floating-point rounding by keeping values as integers until conversion, and prefer sealed traits with case objects for exhaustive pattern matching. Also recommends returning Option/Either instead of throwing exceptions, annotate recursive functions with @tailrec, avoid implicit conversions that hide runtime errors, and always give explicit types on public APIs.

AI-written summary · about

  1. 0:00Intro
  2. 2:11Checking for oddness
  3. 3:24Checking for NaN
  4. 4:34Float in ranges
  5. 5:53Long literals
  6. 7:44Enumerations
  7. 9:41Algebraic Data Types?
  8. 14:31Sealed traits
  9. 17:15Case classes
  10. 18:43Structural types
  11. 27:50Type annotation
  12. 29:41String concatenation
  13. 31:35Exceptions
  14. 43:09The return keyword
  15. 47:45Tail recursion
  16. 49:33Implicit conversions
~/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.