State of the Scala 2 Union Adriaan Moors Scala Team Lead Scala - - PowerPoint PPT Presentation
State of the Scala 2 Union Adriaan Moors Scala Team Lead Scala - - PowerPoint PPT Presentation
State of the Scala 2 Union Adriaan Moors Scala Team Lead Scala 2.13 Developer survey! scala-lang.org/news/survey-2018.html Apache v2.0! scala-lang.org/news/license-change.html (deadline for any concerns: Aug 10) Library release
State of the Scala 2 Union
Adriaan Moors Scala Team Lead
Scala 2.13
Developer survey!
scala-lang.org/news/survey-2018.html
Apache v2.0!
scala-lang.org/news/license-change.html
(deadline for any concerns: Aug 10)
Library release
scala/scala-dev#324
M4 out now M5 early August Final: October
Headlines
Simpler collections Smaller core lib Faster compiler Java 9 support (minimal) User-friendliness
Simpler Collections
Fix common gotchas Simplify implementation & usage Improved type inference of overloaded HO method Available now (M4)
2.13.0-M4 upgrade
Thank you, ! × 18 scala/community-builds#710 @xuwei-k
Smaller core lib
Parallel collections: ✅ compact1 profile: ✅ #6164 Make way for new modules #5677
Looking at you, scala.io, scala.sys
Faster Compiler
Optimization Automated Benchmarking & Charting 20% improvement (last 12 months, hot compiler)
User-friendliness
Improve tooling
Scala Center
Better docs
Great way to start contributing
Scalafix
use for upgrade to 2.14 procedure syntax add sigs for implicits (& non-private members?) collections also, style checking / linting (built on scala.meta's semantic api)
LSP: modern IDE support
Dotty presentation compiler TASTY and SemanticDB
BSP / Build tools
Bloop (not a build tool) Mill (bazel-ish) Fury (source dependencies) <insert your build tool here>
Typelevel & friends!
literal singleton types implicit search type constructor inference
#help-wanted
Configurable error reporting Suppress warnings Nicer REPL
Revamp REPL
syntax highlighting nicer editing cleaner wrapping improve embeddability (e.g. Spark) parity with Ammonite
Intermezzo
Scala?
Fusion!
Fusion ⇒ Flexibility
Powerful Also, challenging!
OO & FP
- bjects = modules
functions = small objects
Safe & Concise
Static types: safety + understanding Type inference: elide details Together: refactoring
Impure ↔ Pure Strict ↔ Lazy
Orthogonal concerns
Scala Spectrum
Challenge: pick right point
(At least you have the choice.)
GTD ↔ Correctness
Type checker = lightweight verifier Cost of Failure ↔ Verification?
Cost of Abstraction
See: Why the free monad is not free
Empathy-Driven Development
Math is good to recognize patterns But we need to communicate intent
Math ↔ Practice
math / fun: inspires structure, not names modules: names, mutual recursion
Future correctness checks?
Effect system? Ownership?
Scala Spectrum
More opinionated in 3.0 Keep essential flexibility
Scala 2.14
Close the Scala 3 Gap
stdlib identical (2.13 & 3.0) TASTY interop shared compiler (post-typer) tooling
T-AST-y?
Source code, fully type checked Full semantic information
Binary Compatibility?
TASTY: Source compat == bin compat Not about: API evolution
Simplify
github.com/scala/scala-dev/milestone/18
Drop:
early initializers trait parameters procedure syntax
Deprecate:
forSome: only wildcards value classes: opaque types whitebox macros: typelevel fun / codegen package object inheritance? vast implicit scope? (ignore packages in prefix)
Add
trait parameters
- paque types
type lambda
Implicits
must have explicit return type lazy implicit (see: shapeless) multiple implicit parameter lists (see: Aux in shapeless)
(Maybe) New JVM shiny
varhandles minimal value types? …
Scala 3
Kinda like 2.15
Just more exciting :-)
Excitement
Implicit function types Union types transparent + principled meta-programming New macros enum @static
Fin
Grateful
Contributors Community Scala Center Dotty Team
Thank you
Any Questions!?!