Please log in to watch this conference skillscast.
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:
- Lightbend Akka for Scala - Professional (in London on 11th - 12th November 2019)
- Modern development with Java (in London on 9th - 11th December 2019)
- Scala eXchange London 2019 (in London on 12th - 13th December 2019)
- Scalax2gether Community Day 2019 (in London on 14th December 2019)
- Code Kata: Yilin Wei - Optics with Monocle (in London on 22nd October 2019)
- Don’t keep it to yourself - openness and honesty in the workplace (in London on 30th October 2019)
- Higher-Order Type-Level Programming (SkillsCast recorded in October 2019)
- Stick to Simple Haskell (SkillsCast recorded in October 2019)
Refinement Types in Practice
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