An Introduction to Functional Imperative Programming in Flix
summary
Flix presents a real language with a type and effect polymorphism system that infers purity, a region-based memory model that lets functions allocate mutable arrays inside a lexical region and still remain pure externally, and purity reflection that lets libraries run pure callbacks in parallel (library spawns threads ≈ core count). Examples include sorting by converting a list to a region-scoped mutable array and a swap function whose signature records the touched region; VS Code tooling and GitHub sources are available.
AI-written summary · about
chapters (20)
- 0:00Introduction
- 1:37The Flix Principle
- 3:09Type and Effect System
- 9:29Effect Polymorphism
- 11:06Catching Bugs
- 12:29Summary: Effect System
- 17:11Example: Sorting
- 18:57Example: Adding Two Numbers
- 20:01Example: Swapping Elements
- 20:50Example: ToString
- 21:552 Summary: Region-based Memory
- 25:29The Iterator Data Type
- 29:523 Summary: Iterators in Action
- 32:46Selective Parallelism
- 34:46Example II: Automatic Parallelization
- 35:43A Fresh Take on Data Transformations
- 36:18Summary: Purity Reflection
- 37:19Visual Studio Code Support
- 39:47Summary (1/2)
- 40:27Outro
related talks
01h 02mPolyglot Programming through Foreign Function Interfaces
26mFusing Session-Typed Concurrent Programming into Functional Programming
19mAssociated Effects: Flexible Abstractions for Effectful Programming
35mOutperforming Imperative with Pure Functional Languages
55mKeynote: Functionalist programming language design
05mFunctional Programming without the Functions
16mPolymorphic Types and Effects with Boolean Unification
20mFluent APIs in Functional Languages
