Please log in to watch this conference skillscast.
This talk will discuss how to apply the upcoming GHC language extension LinearTypes to manage references to values in a foreign language.
Our case study will be inline-java, a library that allows you to embed Java code in Haskell modules and integrates the JVM and the Haskell runtimes. Managing references to objects in the Java heap has remained an error-prone task. The programmer is responsible for deleting these references in a timely fashion. Delete too soon, and we get use-after-free errors. Delete too late, and we get intermittent OutOfMemory errors from the JVM. Forget to delete a few of them, and the memory of your application will grow steadily over time without an obvious cause.
We will show how linear types involve the compiler in checking that a program does a timely disposal of references to foreign values, effectively eliminating the most common bugs related to it.
YOU MAY ALSO LIKE:
- Implementing Inline-* (SkillsCast recorded in October 2018)
- Java Forum (Online Conference on 31st August 2022)
- Haskell eXchange 2022: Novice Track (Online Conference on 7th December 2022)
- Developer Productivity Engineering - Next Big Thing in Software Development (in London on 29th June 2022)
- LJC Lunchtime Lighting Talks (Online Meetup on 1st July 2022)
- Haskell: Why and How the External STG Interpreter is Useful (SkillsCast recorded in December 2021)
- Keynote — Haskell: What To Do When Success Can't Be Avoided (SkillsCast recorded in November 2021)
Typecheck Your Memory Management with Linear Types
Facundo Domínguez
Facundo Domínguez is a software engineer at Tweag IO. He has been using Haskell in industry during the last two decades, and he is long-time contributor to Haskell libraries and GHC. Of late, he coauthored the QualifiedDo language extension, and maintains inline-java, a library to bridge Haskell with Java.