GOTOCon Berlin 2015 - Improving Correctness with Types
03 December 2015 | Tweet |
Iain Hull will be presenting at GOTOCon Berlin 2015
Abstract
This talk is aimed at Scala developers with a background in object oriented programming who want to learn new ways to use types to improve the correctness of their code. It introduces the topic in a practical fashion, concentrating on the “easy wins” developers can apply to their code today.
References
Inspiration
The following links inspired this talk:
- Types vs. Tests: An Epic Battle?
- The abject failure of weak typing
- Using the right type
- Strong types and their impact on testing
- Type Driven Development
- More Typing, Less Testing: TDD with Static Types, Part 1
- More Typing, Less Testing: TDD with Static Types, Part 2
Defensive programming
Fail fast
Design by contract
- Building bug-free O-O software: An introduction to Design by Contract
- Java Modelling Language
- Design by Contract with JML
- Beyond Assertions: Advanced Specification and Verification with JML and ESC/Java2
- Spec#
Never use nulls
- Null references, my billion dollar mistake
- The Neophyte’s Guide to Scala Part 5: The Option Type
- scala.Option Cheat Sheet
- ScalaZ Validation
Almost all data is immutable
Do not throw exceptions
- The Neophyte’s Guide to Scala Part 6: Error Handling With Try
- Try, option or either
- Error handling without throwing your hands up Error handling (Typelevel)
- Scalactic: Or and Every
- Comparing Functional Error Handling in Scalaz and Scalactic
Wrapper types
Type safe equals
- Scalactic: Constrained equality
- Learning Scalaz: Day 1
- Implicits Unchained – Type-safe Equality – Part 1 Part 2 Part 3
Non Empty List
Algebriac data types
- Effective Scala: Case classes as algebraic data types
- What the Heck are Algebraic Data Types? ( for Programmers )
Tagged types
- Practical uses for Unboxed Tagged Types
- Unboxed Tagged Angst
- Shapeless implementation - Object tag
- Typelevel hackery tricks in Scala
More Advanced types
Things I didn’t get a chance to cover, but you might be interested in.
Path dependent types
Self-Recursive Type (F-Bounded Types)
- Recursive Type Signatures in Scala
- F-Bounded Polymorphism: Recursive Type Signatures in Scala
- Scala Type of Types - Self-Recursive Type
Phantom types
- Type safe builder in Scala using type constraints
- Type-safe Builder Pattern in Scala
- Statically Controlling Calls to Methods in Scala
- Going Rogue, Part 2: Phantom Types
Type level programming
- Demystifying Shapeless
- Type level programming in Scala
- Type programming shifting from values to types
Shapeless Dependent types and DbC
- Introduction to Dependent Types in Scala (slides)
- Unifying Programming and Math – The Dependent Type Revolution
- Dependent types and Design by Contract
- Relationship between contracts and dependent typing
About Iain
Iain Hull @IainHull is a Principle Software Developer @ Workday and is a member of the Grid Team. The Grid Team use Scala, Akka, Play and Spray to provide Workday’s elastic job execution environment.