CS Cabal

Toronto-based reading group that meets weekly to read computer science books and papers.

Currently reading: The Little Typer

GuildMeetup listings

Mastodon Social Hub

Mailing list Communication nexus

Code of Conduct Must read

The pizza theory of types

March 8, 2015

By Scott

The Pizza Theory of Types (?!)

Hey everyone, Friday night we kicked off polymorphic month by reading part 1 of Cardelli & Wegner’s paper, “On Understanding Types, Data Abstraction, and Polymorphism”.

Next Friday at 6:30pm at Bento Miso we will continue into sections 2 and beyond of the Cardelli & Wegner paper, so for those of you who missed the first part you should still be able to catch up and come join us.

The first section covers a lot of ground, providing the reasoning behind adding types to programming languages, introducing their definitions of the different types of polymorphism and spending a lot of time exploring the ideas through examples and anecdotes from other programming languages. The authors seem to have a nice sense of humour and I did wonder if maybe one of them had a teenager at the time as the motivation for adding types to the language, could be paraphrased as, “Well, if you’re going to do it anyway, you may as well use protection”, they even refer to types as armour which covers naked untyped representations.

During our discussion, Dann brought up the different types of pizza at Lucalli’s pizza in Brooklyn (Luca + Cardelli -> Lucalli), and we decided that many of the operations normally involving pizza, e.g. Slicing, biting, or dipping are in fact polymorphic with respect to the toppings involved. However, I still thought a baked wheat crust was essential to its pizzaness. Little was I to know, that waiting at home was a sweet potatoe pizza! Showing that not only can the toppings be changed but also the main crust ingredient, boom mind blown! It turns out pizza is a purely abstract type.

Until next time Scott?