~/talk

HAVE WE FOUND THE HOLY ENUM?

Talkat Scalar Conference 2023 · 2023-03-23..03-24· [scala]
slides:none on file

Scala 2's built-in Enumeration lacks custom fields and compile-time exhaustiveness and only offers unsafe name lookup, while sealed ADTs add parameters and exhaustiveness but force manual values and lookup boilerplate. Adding Enumeratum buys generated implementations via findValues macro so lookup and listing work. Scala 3's new enum keyword natively supports constructor parameters, methods, exhaustiveness, values and valueOf (unsafe); a companion adds a safe Option-based lookup, and enums can interoperate with Java by extending java.lang.Enum.

AI-written summary · about

  1. 0:00Scala enums journey
  2. 1:47Scala 2 enum limits
  3. 8:07ADTs for enums in Scala 2
  4. 14:55Enumeratum in Scala 2
  5. 17:45Scala 3 enum features
  6. 24:40Java interop in Scala 3 enums
  7. 27:26Enum evolution summary & Q&A
~/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.