🎉 Black Friday Sale! Save 30% when you subscribe today.

About

Point-Free is a video series that explores advanced topics in the Swift programming language. Each episode covers a topic that may seem complex and academic at first, but turns out to be quite simple. At the end of each episode we’ll ask “what’s the point?!”, so that we can bring the concepts back down to earth and show how these ideas can improve the quality of your code today.

Your hosts

Brandon and Stephen are industry experts living in New York and California. They previously helped build and open source the Kickstarter mobile apps, and have worked with dozens of companies to help build their products and improve their engineering practices.

Avatar of Brandon Williams.

Brandon Williams

Brandon did math for a very long time, and now enjoys talking about functional programming as a means to better our craft as engineers.

Follow on Twitter
Avatar of Stephen Celis.

Stephen Celis

Stephen taught himself to code when he realized his English degree didn’t pay the bills. He became a functional convert and believer after years of objects.

Follow on Twitter

What we’ll cover

We’ve got so much we want to talk about, but just a quick overview of the things we have planned:

Pure functions and side effects

Side effects are one of the greatest sources of complexity in an application, and every program has this in common. After giving a proper definition of side effects and pure functions, we will show how to push the effects to the boundary of your application, leaving behind an understandable, testable and pure core.

Code reuse through function composition

The most basic unit of code reusability comes in the form of simple function composition. We will show that by focusing on small atomic units that compose well, we can build large complex systems that are easy to understand.

Maximizing the use of the type system

You’ve already seen how the type system helps prevent bugs by making sure you don’t accidentally add an integer to a string, or call a method on a “null” value, but it can do so much more. You can encode invariants of your application directly into the types so impossible application states are not representable and can never compile.

Turning programming problems into algebraic problems

Algebraic problems are nice because they carry structure that can be manipulated in predictable and understandable ways. For example, if you have ever simplified a complicated boolean expression that looked like a && b || a && c to look like a && (b || c), you were exploiting the algebraic stucture that || and && have. Many programming problems can be given an algebraic structure that allows one to manipulate the problem in the same way you factored out the a && from that expression.

And so much more…

Open source

When we open-sourced the entire iOS and Android codebases at Kickstarter, we saw that it was one of the best resources to show people how to build a large application in the functional style. It transcended any talks about the theoretical benefits or proposed simplifications. We could just show directly how embracing pure functions allowed us to write code that was understandable in isolation, and enabled us to write tests for every subtle edge case.

We wanted to be able to do that again, but this time we’d build an entire website in server-side Swift, all in the functional style! This meant we had to build nearly everything from scratch, from server middleware and routing to HTML views and CSS.

We discovered quite a few fun things along the way, like using Swift Playgrounds to design pages in an iterative fashion, and came to the conclusion that server-side Swift will soon be a viable backend language rivaling almost every other language out there.

You can view the entire source code to this site on our GitHub organization, https://github.com/pointfreeco.