|
|
Miles Sabin's Harnessing the power of Scala types (SCALA-ADV-01-02)
|
CODE: SCALA-ADV-01-02 DURATION: 2 DAY/S
Miles Sabin's Harnessing the power of Scala types course is aimed at developers who have mastered the essentials of
core Scala and want to take their understanding of the language and
its compiler to the next level. It covers Scala's powerful type system
in depth with concrete illustrations of practical applications of it's
more advanced features. The course also introduces the Scala
compiler's plug-in architecture and shows how it can be used to
support tools and extends the language.
LEARN HOW TO:
In Miles Sabin's Harnessing the power of Scala types course you will gain a deep understanding of the Scala programming language allowing you to make full use of its power.
You will:
- Gain a comprehensive understanding of Scala's powerful type system,
how it's used in advanced libraries such as Scalaz, and how
compile-time type-level computation can be put to practical use.
- Learn the inner workings of the Scala 2.8 collections framework, how
to extend it and how to apply the techniques it employs in your own
designs.
- Take away knowledge of how and when to use Scala compiler plugins to
instrument and transform Scala code and how to extend Scala's type
system in domain-specific ways.
- Learn what delimited continuations are, how they are implemented in
Scala and how they can be applied to real world problems.
PROGRAMME
Day 1
A deep dive into the Scala type system
- Abstract types revisited
- Path dependent types
- Family polymorphism
- Traits and self-types
- The Cake pattern and the Bakery of Doom
- Higher-kinded and structural types
- Encoding existentials, virtual classes, higher-rank and ad hoc polymorphism
- Workshop and review
Extending the collections framework
- A review of the collections framework
- The role of higher-kinded types and ad hoc polymorphism
- Builders
- Working with Arrays and Strings
- Crafting a new collection
- Workshop and review
An introduction to scalaz
- Haskell origins
- A selection of typeclasses
- scalaz encodings
- Ad hoc polymorphism vs. subtyping
- Interop with the Scala standard library
- Workshop and review
Day 2
Writing compiler plug-ins
- Compiler phases
- The scalac AST
- Plug-ins to instrument Scala source
- Plug-ins to augment behaviour
- Plug-ins to extend the type system
- Workshop and review
Continuations
- Varieties of continuation
- shift/reset in Scala
- Type-safe printf
- Automatic resource management
- Coroutines
- Generators
- Goto in Scala
- Workshop and review
Type-level computation
- Church numerals and Peano arithmetic
- Encoding the SKI calculus
- Heterogenous lists
- Type lists
- Comparison with C++ template metaprogramming, Agda and Template Haskell
- Workshop and review
|
ABOUT THE AUTHOR
|
Miles Sabin runs a Scala-centric consulting company, Chuusai Ltd, but is perhaps best known in the Scala world for his outstanding contribution to the Scala IDE for Eclipse.
More about Miles Sabin
|
IS THIS COURSE FOR YOU?
If you have mastered the essentials of core Scala and want to learn
more about its type system and how best to exploit it, gain in-depth
understanding of its standard library, and discover what can be
achieved by extending the Scala compiler via its plugin architecture,
then Miles Sabin's Harnessing the power of Scala types is the course for you.
COURSE PREREQUISITES
To benefit from this course you should have 1-2 years experience
working with Scala, and have good general understanding of
object-oriented or functional programming language concepts and implementation.
If you're new to Scala, consider taking Martin Odersky's Scala Workshop or Jonas Boner's Pragmatic Real-World Scala.
COURSE LABS & EXERCISES
Miles Sabin's Harnessing the power of Scala types is a very practical workshop that will mix theory and practice,
presentation and hands-on labs.
|
|
|