Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Existential Types - Make OOP Great Again

Scala Days Conferences via YouTube

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore existential types and their encoding in Scala in this Scala Days Copenhagen 2017 conference talk. Dive into the world of abstraction in programming languages, focusing on how existential types allow developers to write programs that rely on other programs with unknown implementation details. Learn about the challenges of manipulating and combining these abstractions correctly and usefully. Discover concrete use cases demonstrating what existential types can and cannot do, and compare them to other modularization alternatives like basic inheritance and typeclasses. Examine the Scala square of abstraction, covering value parameters, abstract value members, and their differences. Investigate practical applications in encapsulation, component design, and type families. Explore alternative encodings for language definition and evaluation interpreters, including the finally tagless encoding. Gain insights into the trade-offs between type parameters and type members. No theoretical background is required for this informative session on improving object-oriented programming with existential types.

Syllabus

Intro
Outline
Complexity
Modularization and generalization
1.2 Square of abstraction
Scala square of abstraction (1)
Value parameters
Scala square of abstraction (2)
Abstract value members
Scala square of abstraction (3)
Parameters vs abstract members
Scala square of abstraction (4)
Scala square of abstraction (5)
Use cases
2.1 Encapsulation
Scala interface for nix files API
Hiding the File type
Why is it different from using an opaque type?
Encapsulation - summary
User interface Component
Counter component
Container component
Redesign Component with abstract type members
Tabs - view implementation
Modularization - summary
Naive solution - XYPlot
Solution with abstract type members
Type families - summary
Questions?
Evaluating programs
Generalizing interpreters
Alternative encoding: language definition
Alternative encoding: evaluation interpreter
Alternative encoding: interpreting programs
Finally tagless encoding - extensibility
Type parameters vs type members (1)
Finally tagless encoding - summary
Tabs component implementation

Taught by

Scala Days Conferences

Reviews

Start your review of Existential Types - Make OOP Great Again

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.