What You See & What You Get
summary
Shows concrete mismatches between Scala source and the JVM bytecode: uses javap to inspect classfiles and demonstrates how Scala default arguments compile into mangled $ names that Java callers must reference, and how companion objects become a companion object singleton with $-suffixed classes and module accessors. Demonstrates the ugly Java view for defaults and constants, explains the generated identifiers, and recommends limiting defaults to common cases or adding Java-friendly helpers so JVM users don’t have to call weird mangled names.
AI-written summary · about
chapters (8)
- 0:00Start
- 2:02Where Does My Story Start
- 2:25Always Finish What's on Your Plate
- 6:11Back Translations
- 7:42Default Arguments
- 9:51Name Collisions
- 11:30Companion Objects
- 13:11Companions
related talks
36mFrom Scala to ByteCode...
46mImplicits Inspected and Explained
01h 07mBusy Java Developer's Guide to Scala: Basics
41mPractical Scala for the busy Java developer
48mA Birds eye view of the Scala ecosystem
47mScala Rock-Painting
44mScala 2.12 & Java 8: More Fun Together!
30mLessons Learned from 15 Years of Scala in the Wild
