Linear types AMA with Richard Eisenberg, Krzysztof Gogolewski and Arnaud Spiwack

00:00:00
/
01:16:25

March 31st, 2021

1 hr 16 mins 25 secs

Your Host
Special Guests

About this Episode

Three core developers from the Haskell linear types team are on this show: Arnaud Spiwack, Richard Eisenberg and Krzysztof Gogolewski. They have conceived, reviewed and implemented the Haskell linear types extension that is shipped with the latest compiler version. Linear types allow to express that a function uses an argument exactly once in its type signature which opens all kinds of possibilities.

In this episode, Arnaud, Richard and Krzysztof give a short introduction to linear types and then answer community questions that have been asked on reddit. The questions that are answered are outlined below. Links and further material are available on the episode website on compositional.fm/linear-types-ama .

Thank you for contributing the questions and happy listening!

MP3 Chapters:

[00:00:00] Introduction

Questions:

[00 : 12 : 40] Will using linear types throughout my program improve performance?

[00 : 16 : 14] If I see a function with linear type in it's type signature, what kinds of things might it tell me about the purpose or use cases for that function?

[00 : 20 : 51] How might LinearTypes pave the way for an alternative to conduit,pipes, and other streaming IO libraries?

[00 : 23 : 31] Are linear types inferable with the Hindley-Milner algorithm?

[00 : 24 : 54] Are the current boxed linear containers the first step or all that is planned for now?

[00 : 26 : 31] Are nested linear containers possible?

[00 : 30 : 37] There were plans for a safe coerce-style freezing api, does that still seem workable?

[00 : 31 : 44] What is the state of the linear case/let/if/where mechanism?

[00 : 35 : 15] Are there any thoughts about ressource guarantees or RAII types in some far utopian future?

[00 : 41 : 17] How do the Haskell linear types compare to the Rust equivalent?

[00 : 48 : 02] What are the scenarios where the use of linear types makes a lot of sense?

[00 : 51 : 19] Will we get linear functions taking and returning a state token that can effectively replace IO?

[00 : 59 : 10] What benefit will linear types bring to a garbage collected language like Haskell?

[01 : 02 : 13] Is an automatic "C-like" memory management separate from Haskell's garbage collector on the linear types roadmap?

[01 : 02 : 58] Could strictness analysis results be used to suggest extra linear arrows with an optional warning?

[01 : 04 : 04] What are limitations and recommendations concerning migration of existing code?

[01 : 04 : 58] To what extent can a package mix code that uses linear types with code that does not use linear types?

[01 : 07 : 50] What is the recommended practice for migrating existing libraries to use linear types?

Episode Links