LambdaConf 2015 - Programs as Values Pure Composable Database Access in Scala Rob Norris
1,941 views · Published 31 December 2015 · 29:56 · Indexed 28 October 2026
Channel: Confreaks · 2015 · Science & Technology
FP is often glibly described as "programming with functions", but we can equivalently say that FP is about programming with values. Functions are values, failures are values, effects are values, and indeed programs themselves can be treated as values. This talk explores some consequences of this idea of programs-as-values by looking at doobie, a pure-functional database library for Scala. We will examine the low-level implementation via free monads over algebras of the JDBC types, and show how this naturally enables an expressive and safe high-level API with familiar, lightweight, and composable abstractions including streaming result sets, and trivial compatibility with other pure libraries like Remotely and HTTP4s. Even if you are not in the market for a database layer, this talk will provide a practical outline for a general solution to dealing with terrible APIs (like JDBC) in a principled way.
More from this channel
-
35:52
Code Design and the Science of Pleasure
-
48:58
Ruby Software Continuously Delivered and Exhaustively Explained by Brian Guthrie, Srushti Ambekallu
-
40:58
Jruby Polyglot Heaven by Thomas E Enebo and Charles Oliver Nutter
-
42:17
Be a Minecraft modman with Purugin by Thomas E. Enebo
-
36:46
Your tests are lying to you by Chris Parsons
-
23:46
KidsRuby: Think Of The Children! by Ron Evans
-
52:05
Resources, For Real This Time (with Webmachine) by Sean Cribbs
-
38:28
Just Say No To :nodoc: and Document Your Code! by Loren Segal