The Magic Recipe of Scala.js: a Cross‑Platform Language
summary
Scala.js is presented as a way to make Scala truly cross-platform by keeping portability, JavaScript interop and performance as concrete constraints. It covers a demo memory game compiled to JavaScript, describes changes in Scala.js 1.x (global-scope fix and revised name-mangling/overload handling) that restore interoperability, explains full interop with ECMAScript via façades and JS-native classes, and reports benchmarks showing dev-mode is ~2–3× slower than the JVM while production-optimized output approaches JVM speed and is about 10% smaller than Scala.js 0.6 builds.
AI-written summary · about
chapters (31)
- 0:00Scala.js intro
- 1:22Game demo
- 2:48Three key ingredients
- 3:31JVM/JS portability
- 5:15Scala ecosystem compat
- 6:40Class boxes and primitives
- 8:24Structural types and reflection
- 9:48Method overloads to JS
- 12:36JavaScript interop
- 14:21Dev and prod modes
- 16:30Type/exception support
- 17:53Ecosystem test validation
- 19:40Test limits and blockers
- 20:01JS library interop
- 22:06JS facade design
- 25:02Scala.js/JS type semantics
- 27:07Recursive translation
- 28:53JS class definitions
- 30:20Completeness limits
- 31:45JS feature support
- 33:32Type hierarchies
- 36:19IR and optimization
- 39:37Type system properties
- 41:48Scala.js 1.0 updates
- 42:10Global scope access
- 45:03Runtime class creation
- 48:12Dev mode perf
- 49:57Prod mode perf
- 51:43Native JS comparison
- 53:11Advanced typing and events
- 54:35Generated code size
related talks
49mScala js: getting the best of JavaScript and Scala
31mSCALAJS - WEB WITHOUT PAIN OF JAVASCRIPT
56mScala.js: Safety and Sanity in the Wild West of Web development
37m10 years of Scala.js
31mSCALA FROM B TO F - BACKEND DEVELOPER ON FRONTEND
39mCompiling Scala js to WebAssembly
50mFull stack Scala
31mHow I learned to stop worrying and love the frontend
