Professor Claudio Sacerdoti Coen will drive us in the Generalized Algebraic Data Types world.
Here is an abstract of the talk we are going to assist:
Terms (also called expressions) do all the computational work. Types, if present at all, never get their hands dirty: they just stay still doing nothing, supervising if terms behave well. Many years ago some rebels wanted to put types to work too, by allowing computations in them as well. Dependent types were born, but types refused to cooperate and made the life of programmers so hard that only masochistic academics fell in love with them.
Fast forward a few decades: finally somebody understood how to reach a compromise between complexity and expressivity: Generalized Algebraic Data Types (GADTs) were born. Currently, they are implemented (without run-time overhead over ADT!) both in OCaml and Haskell and there is on-going work to try to fit them in other languages as well (e.g. Scala). By using GADTs one can
1) type expressions and functions that escaped all previous type systems (e.g. printf-like functions)
2) impose at compile time invariants on the data structures to prevent errors
3) achieve more precise typing for already typable functions, improving clarity and reducing the size of the code and the need for dealing in the code with impossible cases
4) make data types abstract (i.e. hiding their implementation) in restricted parts of the code, flexibly
5) write complex functions and types that nobody sane will be able to decipher...
I will try (and maybe fail..) to give a (very?) gentle introduction to the subject, assuming minimal knowledge on Abstract Data Types and OCaml/Haskell.
Why you should attend this event?
Make you curious about a still-considered-exoteric programming language construct that -- when used properly -- can really improve your code in several situations, adding zero run-time overhead. In the worst case you will be able at least to surprise your friends writing a type-safe printf in user space :-)
Thanks to Luogocomune to host this event.
Pizza and beer will be available before the event start for 5 euro.