State of the Scala 2 Union Adriaan Moors Scala Team Lead Scala - - PowerPoint PPT Presentation

state of the scala 2 union
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1
slide-2
SLIDE 2

State of the Scala 2 Union

Adriaan Moors Scala Team Lead

slide-3
SLIDE 3

Scala 2.13

slide-4
SLIDE 4

Developer survey!

scala-lang.org/news/survey-2018.html

slide-5
SLIDE 5

Apache v2.0!

scala-lang.org/news/license-change.html

(deadline for any concerns: Aug 10)

slide-6
SLIDE 6

Library release

scala/scala-dev#324

M4 out now M5 early August Final: October

slide-7
SLIDE 7

Headlines

Simpler collections Smaller core lib Faster compiler Java 9 support (minimal) User-friendliness

slide-8
SLIDE 8

Simpler Collections

Fix common gotchas Simplify implementation & usage Improved type inference of overloaded HO method Available now (M4)

slide-9
SLIDE 9

2.13.0-M4 upgrade

Thank you, ! × 18 scala/community-builds#710 @xuwei-k

slide-10
SLIDE 10

Smaller core lib

Parallel collections: ✅ compact1 profile: ✅ #6164 Make way for new modules #5677

Looking at you, scala.io, scala.sys

slide-11
SLIDE 11

Faster Compiler

Optimization Automated Benchmarking & Charting 20% improvement (last 12 months, hot compiler)

slide-12
SLIDE 12

User-friendliness

Improve tooling

Scala Center

Better docs

Great way to start contributing

slide-13
SLIDE 13

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)

slide-14
SLIDE 14

LSP: modern IDE support

Dotty presentation compiler TASTY and SemanticDB

slide-15
SLIDE 15

BSP / Build tools

Bloop (not a build tool) Mill (bazel-ish) Fury (source dependencies) <insert your build tool here>

slide-16
SLIDE 16

Typelevel & friends!

literal singleton types implicit search type constructor inference

slide-17
SLIDE 17

#help-wanted

Configurable error reporting Suppress warnings Nicer REPL

slide-18
SLIDE 18

Revamp REPL

syntax highlighting nicer editing cleaner wrapping improve embeddability (e.g. Spark) parity with Ammonite

slide-19
SLIDE 19

Intermezzo

slide-20
SLIDE 20

Scala?

slide-21
SLIDE 21

Fusion!

slide-22
SLIDE 22

Fusion ⇒ Flexibility

Powerful Also, challenging!

slide-23
SLIDE 23

OO & FP

  • bjects = modules

functions = small objects

slide-24
SLIDE 24

Safe & Concise

Static types: safety + understanding Type inference: elide details Together: refactoring

slide-25
SLIDE 25

Impure ↔ Pure Strict ↔ Lazy

Orthogonal concerns

slide-26
SLIDE 26

Scala Spectrum

Challenge: pick right point

(At least you have the choice.)

slide-27
SLIDE 27

GTD ↔ Correctness

Type checker = lightweight verifier Cost of Failure ↔ Verification?

slide-28
SLIDE 28

Cost of Abstraction

See: Why the free monad is not free

slide-29
SLIDE 29

Empathy-Driven Development

Math is good to recognize patterns But we need to communicate intent

slide-30
SLIDE 30

Math ↔ Practice

math / fun: inspires structure, not names modules: names, mutual recursion

slide-31
SLIDE 31

Future correctness checks?

Effect system? Ownership?

slide-32
SLIDE 32

Scala Spectrum

More opinionated in 3.0 Keep essential flexibility

slide-33
SLIDE 33

Scala 2.14

slide-34
SLIDE 34

Close the Scala 3 Gap

stdlib identical (2.13 & 3.0) TASTY interop shared compiler (post-typer) tooling

slide-35
SLIDE 35

T-AST-y?

Source code, fully type checked Full semantic information

slide-36
SLIDE 36

Binary Compatibility?

TASTY: Source compat == bin compat Not about: API evolution

slide-37
SLIDE 37

Simplify

github.com/scala/scala-dev/milestone/18

slide-38
SLIDE 38

Drop:

early initializers trait parameters procedure syntax

slide-39
SLIDE 39

Deprecate:

forSome: only wildcards value classes: opaque types whitebox macros: typelevel fun / codegen package object inheritance? vast implicit scope? (ignore packages in prefix)

slide-40
SLIDE 40

Add

trait parameters

  • paque types

type lambda

slide-41
SLIDE 41

Implicits

must have explicit return type lazy implicit (see: shapeless) multiple implicit parameter lists (see: Aux in shapeless)

slide-42
SLIDE 42

(Maybe) New JVM shiny

varhandles minimal value types? …

slide-43
SLIDE 43

Scala 3

slide-44
SLIDE 44

Kinda like 2.15

Just more exciting :-)

slide-45
SLIDE 45

Excitement

Implicit function types Union types transparent + principled meta-programming New macros enum @static

slide-46
SLIDE 46

Fin

slide-47
SLIDE 47

Grateful

Contributors Community Scala Center Dotty Team

slide-48
SLIDE 48

Thank you

Any Questions!?!