The personal website of Daniel Brice, PhD.
I’ll be using this space to muse about Math and coding and games, mostly.
Latest Blog Posts
Recently to a friend, I quipped that it’d be a good exercise towards demystifying Haskell’smore...
IOtype to write a comparable
This will be a small post where I share some techniques we found for getting some additional type safety from our Scala case classes. We’ll look at case classes that validate their input data and we look at case classes that allow selecting from among multiple instances of the same typeclass.more...
Wherein I attempt to give a 10,000-foot overview of semantics of programming languages.more...
This post is Part 3 of a series on type-safe failure handling. Part 1 is in Scala and examines Scala’smore...
Eitherclass as a mechanism for early-return control flow. Part 2 ports the program to Haskell, where I/O is explicitly encapsulated by the
IOtype. This post will demonstrate the use of monad transformers to refactor the example from Part 2.
In a previous post, we added exception handling to a hypothetical API server written in Scala. Since Scala implicitly allows arbitrary I/O anywhere, modeling exception handling by adding a layer of indirection usingmore...
Eithervalues was essentially free. I wanted to try implementing the same logic in Haskell, which would force us to deal with intermingling exception handling intermingled with explicit I/O, creating two layers of abstraction that we’ll have to juggle.