Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

Compose :: Melbourne 2017 - George Wilson - Type Class: The Ultimate Ad Hoc

Автор: Compose Conference

Загружено: 2017-10-12

Просмотров: 5429

Описание:

http://www.composeconference.org/2017...

Since their inception in Haskell, type classes have become a popular feature of modern functional programming. Indeed, key topics in FP often take the form of type classes, such as Monoid and Functor. Many languages developed since Haskell have included type classes in their design, such as Idris and Purescript; or offered facilities capable of simulating type classes, such as Scala's implicits or OCaml's modules.

In this talk we go beyond the basics with type classes. First we'll differentiate between parametric and ad hoc polymorphism, and we'll see why type classes are a compelling solution to the latter. By comparing them to other solutions - Java interfaces and Scala implicits - we'll see the advantages of type classes. In particular, we will focus on why type classes are principled. This section will include examples in Java, Scala, and Haskell.

In order to be principled, there are conditions on the creation of instances: there can be a maximum of one instance for a given type for a given type class, and it must be in one of two allowed places. We will justify this rigidity by discussing instance coherence and its benefits, with examples of incoherence silently causing bugs. We will learn what orphan instances are and why they can be problematic for coherence.

Finally, practical guidelines will be given for programmers aiming to simulate type classes in other languages, as is popular in the Scala community. These guidelines, when followed with discipline, will allow one to recover many of the benefits of type classes. Examples in this section will be in Scala.

Goal

Attendees will leave knowing the difference between parametric and ad hoc polymorphism, and they will understand why type classes are a principled approach to the latter. Attendees wishing to simulate type classes in a capable language, such as Scala, will leave the talk with practical guidelines helping them to do so.

About George Wilson

George Wilson is an enthusiastic functional programmer at the Queensland Functional Programming Lab, under Data61/CSIRO, located in Brisbane, Australia.

George co-organises the Brisbane Functional Programming Group and enjoys teaching and learning functional programming and related areas of mathematics.

Compose :: Melbourne 2017 - George Wilson - Type Class: The Ultimate Ad Hoc

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

George Wilson - The Extended Functor Family

George Wilson - The Extended Functor Family

George Wilson  - An Intuition for Propagators  - Compose Melbourne 2019

George Wilson - An Intuition for Propagators - Compose Melbourne 2019

Adventure with Types in Haskell - Simon Peyton Jones (Lecture 1)

Adventure with Types in Haskell - Simon Peyton Jones (Lecture 1)

Compose :: Melbourne 2017 - Huw Campbell - Grenade - Dependently Typed Neural Networks in Haskell

Compose :: Melbourne 2017 - Huw Campbell - Grenade - Dependently Typed Neural Networks in Haskell

Compose :: Melbourne 2017 - Justin Bedő - BioShake: A Haskell EDSL for Bio-Informatics Pipelines

Compose :: Melbourne 2017 - Justin Bedő - BioShake: A Haskell EDSL for Bio-Informatics Pipelines

Functional Programming with Effects by Rob Norris

Functional Programming with Effects by Rob Norris

The Probability Monad

The Probability Monad

Pure Functional Database Programming with Fixpoint Types—Rob Norris

Pure Functional Database Programming with Fixpoint Types—Rob Norris

Bidirectional Type Checking

Bidirectional Type Checking

A Crash Course in Category Theory - Bartosz Milewski

A Crash Course in Category Theory - Bartosz Milewski

Kubernetes — Простым Языком на Понятном Примере

Kubernetes — Простым Языком на Понятном Примере

"Building Haskell Programs with Fused Effects" by Patrick Thomson

Richard Eisenberg on Dependent Types

Richard Eisenberg on Dependent Types

Simon Peyton Jones - A History of Haskell: being lazy with class

Simon Peyton Jones - A History of Haskell: being lazy with class

Functional architecture - The pits of success - Mark Seemann

Functional architecture - The pits of success - Mark Seemann

Lambda Calculus - Fundamentals of Lambda Calculus & Functional Programming in JavaScript

Lambda Calculus - Fundamentals of Lambda Calculus & Functional Programming in JavaScript

"An Introduction to Combinator Compilers and Graph Reduction Machines" by David Graunke

LLM и GPT - как работают большие языковые модели? Визуальное введение в трансформеры

LLM и GPT - как работают большие языковые модели? Визуальное введение в трансформеры

Ambrose Bonnaire Sergeant  - The Hidden Data Flow in Types - Compose Melbourne 2019

Ambrose Bonnaire Sergeant - The Hidden Data Flow in Types - Compose Melbourne 2019

"Point-Free or Die: Tacit Programming in Haskell and Beyond" by Amar Shah

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]