Loading…
Scala By the Bay has ended
View analytic
Saturday, August 15 • 1:30pm - 2:10pm
Programs as Values: JDBC Programming with Doobie

Sign up or log in to save this to your schedule and see who's attending!

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.

Speakers
avatar for Rob Norris

Rob Norris

Irritant, Gemini Observatory
Software Engineer


Saturday August 15, 2015 1:30pm - 2:10pm
Track A

Attendees (0)