Scala Days 2016 Overview – Scala 2.12 – Scala 2.13



Scala Days 2016 Overview – Scala 2.12 – Scala 2.13

1 0


scaladays-2016-overview

Scaladays 2016 NYC Overview

On Github maxyermayank / scaladays-2016-overview

Scala Days 2016 Overview

Mayank Patel

Application Architect - Oildex, a service of Transzap

Linked In  /  @maxy_ermayank

David Buschman

Technical Lead - Timeli.io

Linked In  /  @lightspeed7  /  Visualize.me

Summary

  • 2.12 Release and beyond
  • Dotty
  • New Tooling
  • Scala Center
  • Spark 2.0 Preview
  • Scala JS
  • Scala Native

Scala 2.12

  • Only runs on Java 8
  • Smaller executable footprint - uses new Java 8 JVM features
  • Faster execution speeds
  • Focus was on the compiler and "future" stability
  • 33 Features documented in Release Notes
  • 336 PRs from 65 committers
  • Still on Java 6/7 ? -- 2.11 will supported for a while to come

Scala 2.12 Futures

  • Added flatten so no need to .flatMap(identity) anymore
  • Added zip and zipWith to join futures
  • New transform method, map and recover implemented with it
  • Easy to lift into a Try, someFuture.transform(Try(_))
  • New transformWith for flatMap and recoverWith
  • onSuccess and onFailure will be deprecated
  • "zero" for Future - Future.unit will replace Future.successful(())
  • Never completing future - Future.never to prevent memory leaks
  • No more use of sun.misc.Unsafe

Scala 2.12 Links

Scala 2.13

  • 2.13 will focus on libraries, 2.12 focused on the compiler
  • Simplified Collections, more inline with Spark, better lazy
  • Call for Strawman proposals open now, submit yours
  • Scala stdlib split, scala-core and scala-platform

DOTTY

  • What is Dotty ?: New Scala Compiler base on Dot
  • What is Dot ?: A new simple language used to prove and reason about new Scala features
  • Why?:
    • Allows for more "dialects" for the Scala language
    • Keep the language stable with features that are trust worthy
    • Bit more than half the size of current Scala compiler
    • Twice the speed of nsc (Current Scala compiler). Lot more opportunity ahead.
    • Dotty plugin for InteliJ IDE under development

DOT

  • Proven foundation for Scala
  • Calculus with a minimal language subset
  • Concludes and 8 year effort!
  • Encode much of the language from this instruction set
  • Opens the door to do much more language work with better confidence than before
  • Provides a way to prove type soundness for the language
  • higher-order unification for type constructor -- SI-2712

DOTTY

NOT moving to Dotty

  • Procedure Syntax
  • Macros
  • DelayedInit
  • General Type Protection
  • Early Initializers
  • Existential Types

New Features in Dotty

  • Intersection Types
  • Union Types
  • Function Arity Adaptation
  • @static methods and fields
  • Named Type Parameters
  • Multiversal Equalities
  • Not blocking lazy vals
  • Trait parameters

New Tooling

  • Package Index - ScalaDex - the world of Scala libraries
  • ScalaFiddle - do I need to explain?
  • Sip/Slip Process - revamp to simplify and make better
  • ScalaBlitz
  • Scalameta (Replacement for Macros)
  • Scalafmt
  • Doc generation with dynamic linking for cross linking documentation across libraries

Scala Center

  • New Steward for Scala, non-profit organization at EPFL
  • Independently guide and support the Scala community
  • Coordinate and develop open source libraries and tools for the benefit of all Scala users
  • Provide deep, and quality, educational materials for Scala
  • Money funded/donated -- IBM, Verizon, Golden Sachs, Nitro, Lightbend, 47 degrees

More Details in @heathercmiller Key Note

Spark 2.0 Preview

  • Not initial Kafka support in 2.0, maybe 2.1
  • Based and optimzed for DataFrames and DataSets
  • Aggressive optimizations improvements

Scala JS

  • Latest 0.6.9
  • "native" anonymous class
  • js.tupleN
  • Junit Support
  • Faster code generation

Scala Native

  • A new dialect for Scala that does NOT run on the JVM
  • Write Scala to run on LLVM
  • Really cool but very limited right now
  • C level performance for some operations
  • Almost all stdlib features supported

Session slides & Resources (1 of 2)

Session slides & Resources (2 of 2)

Scala Days You Tube Channel

Tim Spann @PaaSDev -

DZone: Scala Days NYC 2016: Highlights

Thanks

Scala Days 2016 Overview