Vomksrkfo8e9ltxnfhxr
SkillsCast

Refinement Types in Practice

14th December 2017 in London at Business Design Centre

There are 53 other SkillsCasts available from Scala eXchange 2017

Please log in to watch this conference skillscast.

Https s3.amazonaws.com prod.tracker2 resource 41088130 skillsmatter conference skillscast o9nohu

When you first learn scala, coming from another language such as Java, you'll probably fall in love with the Option type. This type protects you from bugs because you know that the value wrapped in an Option might be absent and if you have a plain value, you know it will never be null.

What if you could extend this and have types that provide even stronger guarantees, for example: a String that is never empty, an Int that is always known to be positive? Refinement types allow exactly this. You refine a base type, like a String with a predicate, such as minimum length must be 5 and wherever you have a value of this refined type in your code, you can rest assured that it conforms.

In this session, you will explore the refined library and learn how to use it in practice with some popular libraries/frameworks. Together you will discover a Play/Slick example application that's strongly typed, using refinement types.

YOU MAY ALSO LIKE:

Thanks to our sponsors

Refinement Types in Practice

Peter Mortier

Peter is a well seasoned freelance developer, who still vividly remembers the birth of the JVM. Currently he's exploring the field of functional programming in scala at the Agency for roads and traffic of the Flemish government

SkillsCast

Please log in to watch this conference skillscast.

Https s3.amazonaws.com prod.tracker2 resource 41088130 skillsmatter conference skillscast o9nohu

When you first learn scala, coming from another language such as Java, you'll probably fall in love with the Option type. This type protects you from bugs because you know that the value wrapped in an Option might be absent and if you have a plain value, you know it will never be null.

What if you could extend this and have types that provide even stronger guarantees, for example: a String that is never empty, an Int that is always known to be positive? Refinement types allow exactly this. You refine a base type, like a String with a predicate, such as minimum length must be 5 and wherever you have a value of this refined type in your code, you can rest assured that it conforms.

In this session, you will explore the refined library and learn how to use it in practice with some popular libraries/frameworks. Together you will discover a Play/Slick example application that's strongly typed, using refinement types.

YOU MAY ALSO LIKE:

Thanks to our sponsors

About the Speaker

Refinement Types in Practice

Peter Mortier

Peter is a well seasoned freelance developer, who still vividly remembers the birth of the JVM. Currently he's exploring the field of functional programming in scala at the Agency for roads and traffic of the Flemish government

Photos