Skip to content

Instantly share code, notes, and snippets.

@samjonester
Last active December 28, 2016 03:01
Show Gist options
  • Save samjonester/47b9e737f3fa1a3eae521a7b99c86d9b to your computer and use it in GitHub Desktop.
Save samjonester/47b9e737f3fa1a3eae521a7b99c86d9b to your computer and use it in GitHub Desktop.
Life After Nil

Life After Nil

Abstract

Ruby is late to the type system party. Let’s give Ruby something smart to say when it gets there. You’ll take a journey with Haskell’s type system. Along the way, you’ll learn how types can let you forget about nil, declaratively model your domain, and allow your compiler to drive your design.

Details

How can ANYONE be productive in a language without if/else, while, or even classes? Let me show you! Haskell is proof that sometimes constraints can be liberating. There are murmurs that a type system will be coming to Ruby. Before that happens, you should get informed about what is hot in the current type system market. Haskell is known for it’s type system, but instead of describing it with dense language, let’s take a journey through code examples. Throughout our trip, we will avoid scary buzzwords like “monad” and “algebraic data type” because, honestly, what good is a formal definition when you don’t understand the power behind the concept.

We will compare solutions in Ruby to solutions in Haskell, and each stop on our trip will introduce a new mind blowing paradigm brought to you by Haskell’s type system. You will learn about type systems through a non-threatening story, and you’ll understand the value a type system can bring to your code. Key stops on our route will be “forget about nil”, “declaratively model your domain”, and “allow your compiler to drive your design”.

Pitch

Life After Nil is a friendly display of a type system’s power. Matz said that types are coming to Ruby. We need to learn about types before they’re released. This talk isn’t intended to “sell people” on Haskell, nor is it a cliche “hello world in a new language”.

I have been learning Haskell as a hobby, and I’ve been blown away by it’s elegant handling of Optional data, and the powerful way in which the type system drives the design of my code. I was originally a Java developer, so I am familiar with typical OOP strong typing. However, Haskell’s type system was such a different and enlightening experience, that I’d LOVE to help light that bulb over the heads of many more Rubyists.

About Me

Sam Jones @samjonester

I am a double agent Test Double living in Philadelphia, PA. I have a passion for learning and teaching. I love the ruby community for its inclusivity, and also for fostering such an amazing community, where anyone can share ideas and code. I am a cook and cyclist in my free time, as well as a Husband and Father.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment