SlideShare a Scribd company logo
1 of 67
Download to read offline
What to Leave Implicit
Martin Odersky
Scala Days Chicago
April 2017
Con-textual
what comes with the text,
but is not in the text
Context is all around us
- the current configuration
- the current scope
- the meaning of “<” on this type
- the user on behalf of which the
operation is performed
- the security level in effect
…
- globals
rigid if immutable,
unsafe if mutable
- monkey patching
- dependency injection
at runtime (Spring, Guice)
or with macros (MacWire)
- cake pattern
close coupling + recursion
Traditional ways to express context
“Parameterize all the things”
The Functional Way
- no side effects
- type-safe
- fine-grained control
Functional is Good
- sea of parameters
- most of which hardly ever change
- repetitive, boring, prone to mistakes
But sometimes it’s too much of a
good thing …
If passing a lot of parameters gets tedious,
leave some of them implicit.
A more direct approach
• If there’s one feature that makes Scala “Scala”,
I would pick implicits.
• There’s hardly an API without them.
• They enable advanced and elegant
architectural designs.
• They are also misused way too often.
Implicits
• takes you through the most common uses of
implicits,
• gives recommendations of use patterns,
• goes through a set of proposed language
changes that will make implicits even more
powerful and safer to use.
This Talk
t
• If you do not give an argument to an implicit
parameter, one will be provided for you.
• Eligible are all implicit values that are visible at
the point of call.
• If there are more than one eligible candidate,
the most specific one is chosen.
• If there’s no unique most specific candidate, an
ambiguity error Is reported.
Ground Rules
• They are a cousin of implicit parameters.
• If the type A of an expression does not match
the expected type B …
Implicit Conversions
• They are a cousin of implicit parameters.
• If the type A of an expression does not match
the expected type B …
… the compiler tries to find an implicit
conversion method from A to B.
• Same rules as for implicit parameters apply.
Implicit Conversions
• Shorthand for defining a new class and an
implicit conversion into it.
implicit class C(x: T) { … }
expands to
class C(x: T) { … }
implicit def C(x: T) = new C(x)
Implicit Classes
• Implicits leverage what the compiler knows
about your code.
• They remove repetition and boilerplate.
• But taken too far, they can hurt readability.
When To Use Implicits?
Applicability:
Where are you allowed to elide implied information?
How do you find out this is happening?
Power:
What influence does the elided info have?
Can it change radically behavior or types?
Scope:
How much of the rest of the code do you need to know
to find out what is implied?
Is there always a clear place to look?
* Adapted from Rust’s Language Ergonomics Initiative
Reasoning Footprint of Implicitness*
Patterns of Implicit Conversions
Extension Methods
Discoverability: medium
Power: low
Scope: large, but IDEs help
Extension Methods
Discoverability: medium
Power: low
Scope: large, but IDEs help
Late Trait Implementation
Make existing classes implement new traits
without changing their code.
This was the original reason for implicits in Scala.
Discoverability: low to medium
Power: low to medium
Scope: large, but IDEs help
They also have some use cases, e.g.
• cached implicit classes
• context-dependent views
What about simple conversions?
• Conversions that go both ways
• Conversions that change semantics
E.g. collection.convert.WrapAs{Java,Scala}
Better: Use Converters
collection.convert.DecorateAs{Java,Scala}
Anti Patterns
Conversions that undermine type safety
Anti Patterns
Conversions between pre-existing types
Discoverability: low
Power: high
Scope: very large
Anti Patterns
Discoverability: high
Power: low to high
Scope: large, but can be explored in IntelliJ
Implicit Parameters
Implicit parameters can
• prove theorems
• establish context
• set configurations
• inject dependencies
• model capabilities
• implement type classes
Implicit Parameters - Use Cases
Curry Howard isomorphism:
Types = Theorems
Programs = Proofs
C.f. Kennedy & Russo: “Generalized Type Constraints”, OOPSLA 2004
Prove Theorems
Establish Context
Example: conference management system.
Reviewers should only see (directly or indirectly) the
scores of papers where they have no conflict with an
author.
Establish Context
Example: conference management system.
Context is usually stable, can change at specific points.
Configuration &
Dependency Management
are special cases of context passing.
see also: Dick Wall: The parfait pattern
Implement Type Classes
Example: Ordering
How can we make implicits better?
What will change:
1. Tighten the rules for implicit conversions
2. Lazy implicits
3. Multiple implicit parameter lists
4. Coherence(?)
5. Implicit function types
1. Tighten Rules for
Implicit Conversions
Question: What does this print?
Answer: java.lang.IndexOutOfBoundsException: 42
Hint: List[String] <: Function[Int, String]
In the future: Only implicit methods are eligible as
conversions.
A new class ImplicitConverter allows to abstract over
implicit conversions.
Converters are turned into conversions like this:
1. Tighten Rules for
Implicit Conversions
Implementation Status
2. Lazy Implicits
Problem: When synthesizing code for recursive data
structures, we get divergent implicit searches.
E.g.
will diverge if A expands recursively to Sum[A, B]
2. Lazy Implicits
Solution: Delay the implicit search and tie the recursive
knot with a lazy val if a parameter is call-by-name:
This change, proposed by Miles Sabin, is a more robust
solution than the current “Lazy” type in shapeless.
Implementation Status
3. Multiple Implicit Parameter Lists
Problem: Implicit parameters are currently a bit irregular
compared to normal parameters:
• there can be only one implicit parameter section
• and it must come last.
This leads to some awkward workarounds (c.f. Aux
pattern).
Related problem: It’s sometimes confusing when a
parameter is implicit or explicit.
3. Multiple Implicit Parameter Lists
Proposal:
• Allow multiple implicit parameter lists
• Implicit and explicit parameter lists can be mixed freely.
• Explicit application of an implicit parameter must be
marked with a new “magic” method, explicitly.
• Implementation status: Proposal. Main challenge is
migration from current Scala.
4. Coherence
Difference between Scala’s implicits and Haskell’s type
classes: The latter are required to be coherent:
A type can implement a type class in one way only
(globally).
This is very restrictive, rules out most of the implicit use
cases we have seen.
But it also provides some benefits.
Coherence Rules Out Ambiguities
Say you have a capability system dealing with driver
licences:
If you can drive a truck and a cab, you should be able to
drive a car. But Scala would give you an ambiguity error.
Coherence Rules Out Ambiguities
Proposal:
• Allow type classes to declare themselves coherent.
• Have the compiler check that coherent traits have only
one implementation per type.
This is quite tricky. See github.com/lampepfl/dotty/issues/2047
• Drop all ambiguity checks for coherent implicits.
Parametricity
• It turns out that a necessary condition to ensure
coherence is to disallow operations like equals,
hashCode, isInstanceOf on coherent types.
• This restriction is useful in other contexts as well
because it gives us “theorems for free”.
• Proposal: Change Scala’s
top types to:
• AnyObj has all of current
Any’s methods. Any has only
the escape-hatch method
asInstanceOf.
Implementation Status
5. Implicit Function Types
Have another look at the conference management system:
In a large system, it gets tedious to declare all these
implicit Viewers parameters.
Can we do better?
Having to write
a couple of times does not look so bad.
But in the dotty compiler there are > 2600 occurrences of
the parameter
Would it not be nice to get rid of them?
Towards a solution
Let’s massage the definition of viewRankings a bit:
Towards a solution
Let’s massage the definition of viewRankings a bit:
Towards a solution
Let’s massage the definition of viewRankings a bit:
What is its type?
So far: Viewers => List[Paper]
From now on: implicit Viewers=> List[Paper]
or, desugared: ImplicitFunction1[Viewers, List[Paper]]
Inside ImplicitFunction1
ImplicitFunction1 can be thought of being defined as
follows:
Analogously for all other arities.
Two Rules for Typing
1. Implicit functions get implicit arguments just like implicit
methods. Given:
val f: implicit A => B
implicit val a: A
f expands to f(a).
2. Implicit functions get created on demand. If the
expected type of b is implicit A => B, then
b expands to implicit (_: A) => b
Revised Example
Assume:
Then reformulate:
Efficiency
Implicit function result types can be optimized
Instead of creating a closure like this:
we can simply create a curried function like this:
This brings the cost of implicit functions down to simple
implicit parameters.
Implementation Status
• The reader monad is a somewhat popular method to
pass context.
• Essentially, it wraps the implicit reading in a monad.
• One advantage: The reading is abstracted in a type.
• But I believe this is shooting sparrows with cannons.
• Monads are about sequencing, they have have nothing
to do with passing context.
The Reader Monad
• allow the same conciseness as the reader
monad,
• don’t force you into monadic style with explicit
sequencing,
• are fully composable,
• are more than 7x faster than the reader monad.
Implicit function types
Neat way to define structure-building DSLs, like this:
Natively supported in Groovy and in Kotlin via
“receiver functions”.
An encore: The Builder Pattern
Scala Implementation
• Any situation where an entity is implicitly
understood can be expressed with implicit
function types.
• We have seen:
“The current set of viewers”
“The structure to which current code should be added”
• Other possibilities:
“The current configuration”
“The currently running transaction”
“The capabilities needed to run this code”
"The effects this code has on the outside world”
…
Conjecture
Find out more on scala-lang.org/blog
• Implicit function types are a neat way to
abstract over contexts.
• It’s a very powerful feature, because it allows
one to inject implicit values in a scope simply
by defining a type.
• I expect it will fundamentally affect the kind of
code we will write in the future.
Summary (1)
• Implicit parameters are a fundamental and
powerful language construct.
• They are “just” parameterization, but remove
the boilerplate.
• One construct  multifaceted use cases
• Abstractable using implicit function types.
• Implicit conversions are also very convenient,
but should be used with care.
Summary (2)
When Can I Expect This?
Scala 2.12
Scala 2.13
Scala 3.0
TASTY,
middle end?
stdlib
collections
dotty MVP
dotty 0.x releases
2016
backend, classpath handling
Scala 2.14
2017
2018
This is open source work, depends on community’s contributions.
 Roadmap is tentative, no promises:
“MVP” = minimal
viable
prototype
Dotty:
Dmitry Petrashko Nicolas Stucki
Guillaume Martres Sebastien Douraene
Felix Mulder Ondrej Lhotak
Liu Fengyun Enno Runne
Close collaboration with scalac team @ Lightbend:
Adriaan Moors Seth Tisue
Jason Zaugg Stefan Zeiger
Lukas Rytz
Credits
Thank You

More Related Content

What's hot

PostgreSQLでスケールアウト
PostgreSQLでスケールアウトPostgreSQLでスケールアウト
PostgreSQLでスケールアウトMasahiko Sawada
 
社内Java8勉強会 ラムダ式とストリームAPI
社内Java8勉強会 ラムダ式とストリームAPI社内Java8勉強会 ラムダ式とストリームAPI
社内Java8勉強会 ラムダ式とストリームAPIAkihiro Ikezoe
 
Kafkaを活用するためのストリーム処理の基本
Kafkaを活用するためのストリーム処理の基本Kafkaを活用するためのストリーム処理の基本
Kafkaを活用するためのストリーム処理の基本Sotaro Kimura
 
楽天トラベルとSpring(Spring Day 2016)
楽天トラベルとSpring(Spring Day 2016)楽天トラベルとSpring(Spring Day 2016)
楽天トラベルとSpring(Spring Day 2016)Rakuten Group, Inc.
 
SQL大量発行処理をいかにして高速化するか
SQL大量発行処理をいかにして高速化するかSQL大量発行処理をいかにして高速化するか
SQL大量発行処理をいかにして高速化するかShogo Wakayama
 
Amazon RDS for SQL Serverのソースとしての利用
Amazon RDS for SQL Serverのソースとしての利用Amazon RDS for SQL Serverのソースとしての利用
Amazon RDS for SQL Serverのソースとしての利用QlikPresalesJapan
 
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティスAmazon Web Services Japan
 
KPTは2回目が大切なのに…
KPTは2回目が大切なのに…KPTは2回目が大切なのに…
KPTは2回目が大切なのに…Mineo Matsuya
 
マジックビーンズ
マジックビーンズマジックビーンズ
マジックビーンズAkira Suenami
 
Easybuggy(バグ)の召し上がり方
Easybuggy(バグ)の召し上がり方Easybuggy(バグ)の召し上がり方
Easybuggy(バグ)の召し上がり方広平 田村
 
大規模分散システムの現在 -- Twitter
大規模分散システムの現在 -- Twitter大規模分散システムの現在 -- Twitter
大規模分散システムの現在 -- Twittermaruyama097
 
HandlerSocket plugin for MySQL
HandlerSocket plugin for MySQLHandlerSocket plugin for MySQL
HandlerSocket plugin for MySQLakirahiguchi
 
Yahoo! JAPANのプライベートRDBクラウドとマルチライター型 MySQL #dbts2017 #dbtsOSS
Yahoo! JAPANのプライベートRDBクラウドとマルチライター型 MySQL #dbts2017 #dbtsOSSYahoo! JAPANのプライベートRDBクラウドとマルチライター型 MySQL #dbts2017 #dbtsOSS
Yahoo! JAPANのプライベートRDBクラウドとマルチライター型 MySQL #dbts2017 #dbtsOSSYahoo!デベロッパーネットワーク
 
負荷テスト入門
負荷テスト入門負荷テスト入門
負荷テスト入門Takeo Noda
 
ASTERIA WARP開発前に知っておくべき10の鉄則
ASTERIA WARP開発前に知っておくべき10の鉄則ASTERIA WARP開発前に知っておくべき10の鉄則
ASTERIA WARP開発前に知っておくべき10の鉄則ASTERIA User Group
 
Microsoft Azureを使ったバックアップの基礎
Microsoft Azureを使ったバックアップの基礎Microsoft Azureを使ったバックアップの基礎
Microsoft Azureを使ったバックアップの基礎Tetsuya Yokoyama
 
なぜ「マイクロサービス“化”」が必要なのか
なぜ「マイクロサービス“化”」が必要なのかなぜ「マイクロサービス“化”」が必要なのか
なぜ「マイクロサービス“化”」が必要なのかYusuke Suzuki
 
JVMのGCアルゴリズムとチューニング
JVMのGCアルゴリズムとチューニングJVMのGCアルゴリズムとチューニング
JVMのGCアルゴリズムとチューニング佑哉 廣岡
 
Project calico introduction - OpenStack最新情報セミナー 2017年7月
Project calico introduction - OpenStack最新情報セミナー 2017年7月Project calico introduction - OpenStack最新情報セミナー 2017年7月
Project calico introduction - OpenStack最新情報セミナー 2017年7月VirtualTech Japan Inc.
 

What's hot (20)

PostgreSQLでスケールアウト
PostgreSQLでスケールアウトPostgreSQLでスケールアウト
PostgreSQLでスケールアウト
 
社内Java8勉強会 ラムダ式とストリームAPI
社内Java8勉強会 ラムダ式とストリームAPI社内Java8勉強会 ラムダ式とストリームAPI
社内Java8勉強会 ラムダ式とストリームAPI
 
Kafkaを活用するためのストリーム処理の基本
Kafkaを活用するためのストリーム処理の基本Kafkaを活用するためのストリーム処理の基本
Kafkaを活用するためのストリーム処理の基本
 
Agile Process Audit
Agile Process AuditAgile Process Audit
Agile Process Audit
 
楽天トラベルとSpring(Spring Day 2016)
楽天トラベルとSpring(Spring Day 2016)楽天トラベルとSpring(Spring Day 2016)
楽天トラベルとSpring(Spring Day 2016)
 
SQL大量発行処理をいかにして高速化するか
SQL大量発行処理をいかにして高速化するかSQL大量発行処理をいかにして高速化するか
SQL大量発行処理をいかにして高速化するか
 
Amazon RDS for SQL Serverのソースとしての利用
Amazon RDS for SQL Serverのソースとしての利用Amazon RDS for SQL Serverのソースとしての利用
Amazon RDS for SQL Serverのソースとしての利用
 
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
 
KPTは2回目が大切なのに…
KPTは2回目が大切なのに…KPTは2回目が大切なのに…
KPTは2回目が大切なのに…
 
マジックビーンズ
マジックビーンズマジックビーンズ
マジックビーンズ
 
Easybuggy(バグ)の召し上がり方
Easybuggy(バグ)の召し上がり方Easybuggy(バグ)の召し上がり方
Easybuggy(バグ)の召し上がり方
 
大規模分散システムの現在 -- Twitter
大規模分散システムの現在 -- Twitter大規模分散システムの現在 -- Twitter
大規模分散システムの現在 -- Twitter
 
HandlerSocket plugin for MySQL
HandlerSocket plugin for MySQLHandlerSocket plugin for MySQL
HandlerSocket plugin for MySQL
 
Yahoo! JAPANのプライベートRDBクラウドとマルチライター型 MySQL #dbts2017 #dbtsOSS
Yahoo! JAPANのプライベートRDBクラウドとマルチライター型 MySQL #dbts2017 #dbtsOSSYahoo! JAPANのプライベートRDBクラウドとマルチライター型 MySQL #dbts2017 #dbtsOSS
Yahoo! JAPANのプライベートRDBクラウドとマルチライター型 MySQL #dbts2017 #dbtsOSS
 
負荷テスト入門
負荷テスト入門負荷テスト入門
負荷テスト入門
 
ASTERIA WARP開発前に知っておくべき10の鉄則
ASTERIA WARP開発前に知っておくべき10の鉄則ASTERIA WARP開発前に知っておくべき10の鉄則
ASTERIA WARP開発前に知っておくべき10の鉄則
 
Microsoft Azureを使ったバックアップの基礎
Microsoft Azureを使ったバックアップの基礎Microsoft Azureを使ったバックアップの基礎
Microsoft Azureを使ったバックアップの基礎
 
なぜ「マイクロサービス“化”」が必要なのか
なぜ「マイクロサービス“化”」が必要なのかなぜ「マイクロサービス“化”」が必要なのか
なぜ「マイクロサービス“化”」が必要なのか
 
JVMのGCアルゴリズムとチューニング
JVMのGCアルゴリズムとチューニングJVMのGCアルゴリズムとチューニング
JVMのGCアルゴリズムとチューニング
 
Project calico introduction - OpenStack最新情報セミナー 2017年7月
Project calico introduction - OpenStack最新情報セミナー 2017年7月Project calico introduction - OpenStack最新情報セミナー 2017年7月
Project calico introduction - OpenStack最新情報セミナー 2017年7月
 

Similar to What To Leave Implicit

What To Leave Implicit
What To Leave ImplicitWhat To Leave Implicit
What To Leave ImplicitMartin Odersky
 
Principled And Clean Coding
Principled And Clean CodingPrincipled And Clean Coding
Principled And Clean CodingMetin Ogurlu
 
Working With Concurrency In Java 8
Working With Concurrency In Java 8Working With Concurrency In Java 8
Working With Concurrency In Java 8Heartin Jacob
 
Java Closures
Java ClosuresJava Closures
Java ClosuresBen Evans
 
Open Problems in Automatically Refactoring Legacy Java Software to use New Fe...
Open Problems in Automatically Refactoring Legacy Java Software to use New Fe...Open Problems in Automatically Refactoring Legacy Java Software to use New Fe...
Open Problems in Automatically Refactoring Legacy Java Software to use New Fe...Raffi Khatchadourian
 
EuroAD 2021: ChainRules.jl
EuroAD 2021: ChainRules.jl EuroAD 2021: ChainRules.jl
EuroAD 2021: ChainRules.jl Lyndon White
 
GoF Design patterns I: Introduction + Structural Patterns
GoF Design patterns I:   Introduction + Structural PatternsGoF Design patterns I:   Introduction + Structural Patterns
GoF Design patterns I: Introduction + Structural PatternsSameh Deabes
 
FRONTEND BOOTCAMP Session 2.pptx
FRONTEND BOOTCAMP Session 2.pptxFRONTEND BOOTCAMP Session 2.pptx
FRONTEND BOOTCAMP Session 2.pptxEhtesham46
 
Java+8-New+Features.pdf
Java+8-New+Features.pdfJava+8-New+Features.pdf
Java+8-New+Features.pdfgurukanth4
 
Few minutes To better Code - Refactoring
Few minutes To better Code - RefactoringFew minutes To better Code - Refactoring
Few minutes To better Code - RefactoringDiaa Al-Salehi
 
Introduction to Software - Coder Forge - John Mulhall
Introduction to Software - Coder Forge - John MulhallIntroduction to Software - Coder Forge - John Mulhall
Introduction to Software - Coder Forge - John MulhallJohn Mulhall
 
Improving Software Quality Using Object Oriented Design Principles
Improving Software Quality Using Object Oriented Design PrinciplesImproving Software Quality Using Object Oriented Design Principles
Improving Software Quality Using Object Oriented Design PrinciplesDr. Syed Hassan Amin
 
Framework Design Guidelines
Framework Design GuidelinesFramework Design Guidelines
Framework Design GuidelinesMohamed Meligy
 

Similar to What To Leave Implicit (20)

What To Leave Implicit
What To Leave ImplicitWhat To Leave Implicit
What To Leave Implicit
 
Simplicitly
SimplicitlySimplicitly
Simplicitly
 
Principled And Clean Coding
Principled And Clean CodingPrincipled And Clean Coding
Principled And Clean Coding
 
Working With Concurrency In Java 8
Working With Concurrency In Java 8Working With Concurrency In Java 8
Working With Concurrency In Java 8
 
Java Closures
Java ClosuresJava Closures
Java Closures
 
Open Problems in Automatically Refactoring Legacy Java Software to use New Fe...
Open Problems in Automatically Refactoring Legacy Java Software to use New Fe...Open Problems in Automatically Refactoring Legacy Java Software to use New Fe...
Open Problems in Automatically Refactoring Legacy Java Software to use New Fe...
 
Design p atterns
Design p atternsDesign p atterns
Design p atterns
 
EuroAD 2021: ChainRules.jl
EuroAD 2021: ChainRules.jl EuroAD 2021: ChainRules.jl
EuroAD 2021: ChainRules.jl
 
GoF Design patterns I: Introduction + Structural Patterns
GoF Design patterns I:   Introduction + Structural PatternsGoF Design patterns I:   Introduction + Structural Patterns
GoF Design patterns I: Introduction + Structural Patterns
 
FRONTEND BOOTCAMP Session 2.pptx
FRONTEND BOOTCAMP Session 2.pptxFRONTEND BOOTCAMP Session 2.pptx
FRONTEND BOOTCAMP Session 2.pptx
 
Java+8-New+Features.pdf
Java+8-New+Features.pdfJava+8-New+Features.pdf
Java+8-New+Features.pdf
 
Few minutes To better Code - Refactoring
Few minutes To better Code - RefactoringFew minutes To better Code - Refactoring
Few minutes To better Code - Refactoring
 
Introduction to Software - Coder Forge - John Mulhall
Introduction to Software - Coder Forge - John MulhallIntroduction to Software - Coder Forge - John Mulhall
Introduction to Software - Coder Forge - John Mulhall
 
Functional Programming in Java
Functional Programming in JavaFunctional Programming in Java
Functional Programming in Java
 
Intro to Scala
 Intro to Scala Intro to Scala
Intro to Scala
 
Improving Software Quality Using Object Oriented Design Principles
Improving Software Quality Using Object Oriented Design PrinciplesImproving Software Quality Using Object Oriented Design Principles
Improving Software Quality Using Object Oriented Design Principles
 
14274730 (1).ppt
14274730 (1).ppt14274730 (1).ppt
14274730 (1).ppt
 
Code Metrics
Code MetricsCode Metrics
Code Metrics
 
Core_Java_Interview.pdf
Core_Java_Interview.pdfCore_Java_Interview.pdf
Core_Java_Interview.pdf
 
Framework Design Guidelines
Framework Design GuidelinesFramework Design Guidelines
Framework Design Guidelines
 

More from Martin Odersky

Capabilities for Resources and Effects
Capabilities for Resources and EffectsCapabilities for Resources and Effects
Capabilities for Resources and EffectsMartin Odersky
 
Implementing Higher-Kinded Types in Dotty
Implementing Higher-Kinded Types in DottyImplementing Higher-Kinded Types in Dotty
Implementing Higher-Kinded Types in DottyMartin Odersky
 
Compilers Are Databases
Compilers Are DatabasesCompilers Are Databases
Compilers Are DatabasesMartin Odersky
 
Scala Days San Francisco
Scala Days San FranciscoScala Days San Francisco
Scala Days San FranciscoMartin Odersky
 
The Evolution of Scala
The Evolution of ScalaThe Evolution of Scala
The Evolution of ScalaMartin Odersky
 
Scala - The Simple Parts, SFScala presentation
Scala - The Simple Parts, SFScala presentationScala - The Simple Parts, SFScala presentation
Scala - The Simple Parts, SFScala presentationMartin Odersky
 
flatMap Oslo presentation slides
flatMap Oslo presentation slidesflatMap Oslo presentation slides
flatMap Oslo presentation slidesMartin Odersky
 
Oscon keynote: Working hard to keep it simple
Oscon keynote: Working hard to keep it simpleOscon keynote: Working hard to keep it simple
Oscon keynote: Working hard to keep it simpleMartin Odersky
 
Scala eXchange opening
Scala eXchange openingScala eXchange opening
Scala eXchange openingMartin Odersky
 
Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009Martin Odersky
 

More from Martin Odersky (17)

scalar.pdf
scalar.pdfscalar.pdf
scalar.pdf
 
Capabilities for Resources and Effects
Capabilities for Resources and EffectsCapabilities for Resources and Effects
Capabilities for Resources and Effects
 
Preparing for Scala 3
Preparing for Scala 3Preparing for Scala 3
Preparing for Scala 3
 
From DOT to Dotty
From DOT to DottyFrom DOT to Dotty
From DOT to Dotty
 
Implementing Higher-Kinded Types in Dotty
Implementing Higher-Kinded Types in DottyImplementing Higher-Kinded Types in Dotty
Implementing Higher-Kinded Types in Dotty
 
Scala Days NYC 2016
Scala Days NYC 2016Scala Days NYC 2016
Scala Days NYC 2016
 
Compilers Are Databases
Compilers Are DatabasesCompilers Are Databases
Compilers Are Databases
 
Scala Days San Francisco
Scala Days San FranciscoScala Days San Francisco
Scala Days San Francisco
 
Scalax
ScalaxScalax
Scalax
 
The Evolution of Scala
The Evolution of ScalaThe Evolution of Scala
The Evolution of Scala
 
Scala - The Simple Parts, SFScala presentation
Scala - The Simple Parts, SFScala presentationScala - The Simple Parts, SFScala presentation
Scala - The Simple Parts, SFScala presentation
 
Flatmap
FlatmapFlatmap
Flatmap
 
flatMap Oslo presentation slides
flatMap Oslo presentation slidesflatMap Oslo presentation slides
flatMap Oslo presentation slides
 
Devoxx
DevoxxDevoxx
Devoxx
 
Oscon keynote: Working hard to keep it simple
Oscon keynote: Working hard to keep it simpleOscon keynote: Working hard to keep it simple
Oscon keynote: Working hard to keep it simple
 
Scala eXchange opening
Scala eXchange openingScala eXchange opening
Scala eXchange opening
 
Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009
 

Recently uploaded

Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...BookNet Canada
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Jeffrey Haguewood
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsYoss Cohen
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialJoão Esperancinha
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFMichael Gough
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sectoritnewsafrica
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...itnewsafrica
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 

Recently uploaded (20)

Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorial
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDF
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 

What To Leave Implicit

  • 1. What to Leave Implicit Martin Odersky Scala Days Chicago April 2017
  • 2. Con-textual what comes with the text, but is not in the text
  • 3. Context is all around us - the current configuration - the current scope - the meaning of “<” on this type - the user on behalf of which the operation is performed - the security level in effect …
  • 4. - globals rigid if immutable, unsafe if mutable - monkey patching - dependency injection at runtime (Spring, Guice) or with macros (MacWire) - cake pattern close coupling + recursion Traditional ways to express context
  • 5. “Parameterize all the things” The Functional Way
  • 6. - no side effects - type-safe - fine-grained control Functional is Good
  • 7. - sea of parameters - most of which hardly ever change - repetitive, boring, prone to mistakes But sometimes it’s too much of a good thing …
  • 8. If passing a lot of parameters gets tedious, leave some of them implicit. A more direct approach
  • 9. • If there’s one feature that makes Scala “Scala”, I would pick implicits. • There’s hardly an API without them. • They enable advanced and elegant architectural designs. • They are also misused way too often. Implicits
  • 10. • takes you through the most common uses of implicits, • gives recommendations of use patterns, • goes through a set of proposed language changes that will make implicits even more powerful and safer to use. This Talk t
  • 11. • If you do not give an argument to an implicit parameter, one will be provided for you. • Eligible are all implicit values that are visible at the point of call. • If there are more than one eligible candidate, the most specific one is chosen. • If there’s no unique most specific candidate, an ambiguity error Is reported. Ground Rules
  • 12. • They are a cousin of implicit parameters. • If the type A of an expression does not match the expected type B … Implicit Conversions
  • 13. • They are a cousin of implicit parameters. • If the type A of an expression does not match the expected type B … … the compiler tries to find an implicit conversion method from A to B. • Same rules as for implicit parameters apply. Implicit Conversions
  • 14. • Shorthand for defining a new class and an implicit conversion into it. implicit class C(x: T) { … } expands to class C(x: T) { … } implicit def C(x: T) = new C(x) Implicit Classes
  • 15. • Implicits leverage what the compiler knows about your code. • They remove repetition and boilerplate. • But taken too far, they can hurt readability. When To Use Implicits?
  • 16. Applicability: Where are you allowed to elide implied information? How do you find out this is happening? Power: What influence does the elided info have? Can it change radically behavior or types? Scope: How much of the rest of the code do you need to know to find out what is implied? Is there always a clear place to look? * Adapted from Rust’s Language Ergonomics Initiative Reasoning Footprint of Implicitness*
  • 17. Patterns of Implicit Conversions
  • 18. Extension Methods Discoverability: medium Power: low Scope: large, but IDEs help
  • 19. Extension Methods Discoverability: medium Power: low Scope: large, but IDEs help
  • 20. Late Trait Implementation Make existing classes implement new traits without changing their code. This was the original reason for implicits in Scala. Discoverability: low to medium Power: low to medium Scope: large, but IDEs help
  • 21. They also have some use cases, e.g. • cached implicit classes • context-dependent views What about simple conversions?
  • 22. • Conversions that go both ways • Conversions that change semantics E.g. collection.convert.WrapAs{Java,Scala} Better: Use Converters collection.convert.DecorateAs{Java,Scala} Anti Patterns
  • 23. Conversions that undermine type safety Anti Patterns
  • 24. Conversions between pre-existing types Discoverability: low Power: high Scope: very large Anti Patterns
  • 25. Discoverability: high Power: low to high Scope: large, but can be explored in IntelliJ Implicit Parameters
  • 26. Implicit parameters can • prove theorems • establish context • set configurations • inject dependencies • model capabilities • implement type classes Implicit Parameters - Use Cases
  • 27. Curry Howard isomorphism: Types = Theorems Programs = Proofs C.f. Kennedy & Russo: “Generalized Type Constraints”, OOPSLA 2004 Prove Theorems
  • 28. Establish Context Example: conference management system. Reviewers should only see (directly or indirectly) the scores of papers where they have no conflict with an author.
  • 29. Establish Context Example: conference management system. Context is usually stable, can change at specific points.
  • 30. Configuration & Dependency Management are special cases of context passing. see also: Dick Wall: The parfait pattern
  • 32. How can we make implicits better?
  • 33. What will change: 1. Tighten the rules for implicit conversions 2. Lazy implicits 3. Multiple implicit parameter lists 4. Coherence(?) 5. Implicit function types
  • 34. 1. Tighten Rules for Implicit Conversions Question: What does this print? Answer: java.lang.IndexOutOfBoundsException: 42 Hint: List[String] <: Function[Int, String]
  • 35. In the future: Only implicit methods are eligible as conversions. A new class ImplicitConverter allows to abstract over implicit conversions. Converters are turned into conversions like this: 1. Tighten Rules for Implicit Conversions
  • 37. 2. Lazy Implicits Problem: When synthesizing code for recursive data structures, we get divergent implicit searches. E.g. will diverge if A expands recursively to Sum[A, B]
  • 38. 2. Lazy Implicits Solution: Delay the implicit search and tie the recursive knot with a lazy val if a parameter is call-by-name: This change, proposed by Miles Sabin, is a more robust solution than the current “Lazy” type in shapeless.
  • 40. 3. Multiple Implicit Parameter Lists Problem: Implicit parameters are currently a bit irregular compared to normal parameters: • there can be only one implicit parameter section • and it must come last. This leads to some awkward workarounds (c.f. Aux pattern). Related problem: It’s sometimes confusing when a parameter is implicit or explicit.
  • 41. 3. Multiple Implicit Parameter Lists Proposal: • Allow multiple implicit parameter lists • Implicit and explicit parameter lists can be mixed freely. • Explicit application of an implicit parameter must be marked with a new “magic” method, explicitly. • Implementation status: Proposal. Main challenge is migration from current Scala.
  • 42. 4. Coherence Difference between Scala’s implicits and Haskell’s type classes: The latter are required to be coherent: A type can implement a type class in one way only (globally). This is very restrictive, rules out most of the implicit use cases we have seen. But it also provides some benefits.
  • 43. Coherence Rules Out Ambiguities Say you have a capability system dealing with driver licences: If you can drive a truck and a cab, you should be able to drive a car. But Scala would give you an ambiguity error.
  • 44. Coherence Rules Out Ambiguities Proposal: • Allow type classes to declare themselves coherent. • Have the compiler check that coherent traits have only one implementation per type. This is quite tricky. See github.com/lampepfl/dotty/issues/2047 • Drop all ambiguity checks for coherent implicits.
  • 45. Parametricity • It turns out that a necessary condition to ensure coherence is to disallow operations like equals, hashCode, isInstanceOf on coherent types. • This restriction is useful in other contexts as well because it gives us “theorems for free”. • Proposal: Change Scala’s top types to: • AnyObj has all of current Any’s methods. Any has only the escape-hatch method asInstanceOf.
  • 47. 5. Implicit Function Types Have another look at the conference management system: In a large system, it gets tedious to declare all these implicit Viewers parameters.
  • 48. Can we do better? Having to write a couple of times does not look so bad. But in the dotty compiler there are > 2600 occurrences of the parameter Would it not be nice to get rid of them?
  • 49. Towards a solution Let’s massage the definition of viewRankings a bit:
  • 50. Towards a solution Let’s massage the definition of viewRankings a bit:
  • 51. Towards a solution Let’s massage the definition of viewRankings a bit: What is its type? So far: Viewers => List[Paper] From now on: implicit Viewers=> List[Paper] or, desugared: ImplicitFunction1[Viewers, List[Paper]]
  • 52. Inside ImplicitFunction1 ImplicitFunction1 can be thought of being defined as follows: Analogously for all other arities.
  • 53. Two Rules for Typing 1. Implicit functions get implicit arguments just like implicit methods. Given: val f: implicit A => B implicit val a: A f expands to f(a). 2. Implicit functions get created on demand. If the expected type of b is implicit A => B, then b expands to implicit (_: A) => b
  • 55. Efficiency Implicit function result types can be optimized Instead of creating a closure like this: we can simply create a curried function like this: This brings the cost of implicit functions down to simple implicit parameters.
  • 57. • The reader monad is a somewhat popular method to pass context. • Essentially, it wraps the implicit reading in a monad. • One advantage: The reading is abstracted in a type. • But I believe this is shooting sparrows with cannons. • Monads are about sequencing, they have have nothing to do with passing context. The Reader Monad
  • 58. • allow the same conciseness as the reader monad, • don’t force you into monadic style with explicit sequencing, • are fully composable, • are more than 7x faster than the reader monad. Implicit function types
  • 59. Neat way to define structure-building DSLs, like this: Natively supported in Groovy and in Kotlin via “receiver functions”. An encore: The Builder Pattern
  • 61. • Any situation where an entity is implicitly understood can be expressed with implicit function types. • We have seen: “The current set of viewers” “The structure to which current code should be added” • Other possibilities: “The current configuration” “The currently running transaction” “The capabilities needed to run this code” "The effects this code has on the outside world” … Conjecture
  • 62. Find out more on scala-lang.org/blog
  • 63. • Implicit function types are a neat way to abstract over contexts. • It’s a very powerful feature, because it allows one to inject implicit values in a scope simply by defining a type. • I expect it will fundamentally affect the kind of code we will write in the future. Summary (1)
  • 64. • Implicit parameters are a fundamental and powerful language construct. • They are “just” parameterization, but remove the boilerplate. • One construct  multifaceted use cases • Abstractable using implicit function types. • Implicit conversions are also very convenient, but should be used with care. Summary (2)
  • 65. When Can I Expect This? Scala 2.12 Scala 2.13 Scala 3.0 TASTY, middle end? stdlib collections dotty MVP dotty 0.x releases 2016 backend, classpath handling Scala 2.14 2017 2018 This is open source work, depends on community’s contributions.  Roadmap is tentative, no promises: “MVP” = minimal viable prototype
  • 66. Dotty: Dmitry Petrashko Nicolas Stucki Guillaume Martres Sebastien Douraene Felix Mulder Ondrej Lhotak Liu Fengyun Enno Runne Close collaboration with scalac team @ Lightbend: Adriaan Moors Seth Tisue Jason Zaugg Stefan Zeiger Lukas Rytz Credits

Editor's Notes

  1. OPEN GAMBIT Multicore. Cloud computing. Containers. You’ll likely agree that the infrastructure for amazing scalability is in place, it’s been well funded. It’s the underpinning that’s required for enterprises to movie en masse to the cloud. But what are they moving? Applications. Applications that run their business, engage their customers, allow them to innovate and enter new markets. Without applications, this infinitely scalable infrastructure is nothing.
  2. OPEN GAMBIT Multicore. Cloud computing. Containers. You’ll likely agree that the infrastructure for amazing scalability is in place, it’s been well funded. It’s the underpinning that’s required for enterprises to movie en masse to the cloud. But what are they moving? Applications. Applications that run their business, engage their customers, allow them to innovate and enter new markets. Without applications, this infinitely scalable infrastructure is nothing.