Principles of Elegance
summary
Scala libraries Rapture use implicits, type classes and macros to push checks into the compiler: CSS macro validates properties at compile time, HTML5 nesting is enforced by types so illegal tag combos are compile errors and i18n strings promote language tags to types so accessing a missing locale is a compile error. The HTML builder compiles and works; design prioritizes small public APIs, fewer convenience overloads, and moving complexity into the library to reduce boilerplate.
AI-written summary · about
chapters (13)
- 0:00Start
- 0:08Principles of Elegance
- 7:18Keep Internals Internal
- 10:12Choose Your Names Wisely
- 17:12Structural Types
- 26:04Usability Heuristic
- 36:39Type Classes
- 37:51Extension Methods
- 43:01Hurdles and Caveats
- 43:37Implicit Not Found Annotation
- 49:07Principles of Elegance Keeping Your Api Minimal
- 52:02Chaining Implicit
- 53:20Guidelines for Exceptions
related talks
15mCompilers in styling web UI
49mScala best practices I wish someone'd told me about
01h 33mPrinciples for Modular, Functional, Approachable Libraries
30mAesthetics of code.
27mCSS as Bytecode
39mA few tips on modelling things in Scala
39mTales of Scala's 1001 Styles
31mHow I learned to stop worrying and love the frontend
