How Functional is Direct-Style?
summary
Argues that direct-style in Scala is casually functional rather than purely functional, and demonstrates a working proof-of-concept library ox (open source, 0.x release) that provides parallel/run, race, timeouts, a structured concurrency supervised block, a use-style resource helper, streaming APIs compatible with FS2/Akka, and an error model using exceptions for bugs plus Either for recoverable errors. Claims trade-offs: keeps low learning curve and non‑viral types but sacrifices referential transparency and compiler‑enforced safe resource handling.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 1:02Defining functional programming
- 3:06Casual vs pure FP
- 7:01Direct-style programming
- 9:32Direct-style in Scala
- 13:46Benefits of functional effects
- 14:48Introducing Ox library
- 18:45Conclusion and trade-offs
- 20:12Q&A
related talks
42mA Tour of Ox 1 0 - Direct Style Concurrency and Resiliency
19mScala for the Rest of Us
48mObject Functional Programming
34mDIRECT STYLE SCALA
41mEffective Scala
31mPick a (Effect) Lane: A comparison of direct-style Scala vs effect systems
30mTroll Driven Development: Implementing Functional Effects by Way of Self-Lobotomy
30mNext Generation of Scala
