Thinking Swiftly: The Sapir-Whorf Hypothesis in Code

by Paul Cantrell | at MinneBar 11 | 1:45 – 2:35 in Zeke Landres | View Schedule

Do languages change how we think?

When it first came out, Apple’s Swift was a promising but awkward experiment. With last fall’s 2.0 release, however, it's ready for prime time: a pleasure to work with, the clear best choice for greenfield iOS development, and a serious contender in the general-purpose language space even for non-Apple-stack development.

It’s also quirky, surprising, sometimes eye-opening, and sometimes half-baked.

This session is a dive into Swift — not just “hello world” on a projector, but a focused look at the language’s distinguishing features. I’ll share my experience doing serious, day-in-day-out Swift work on Siesta and several iOS apps, and walk through illuminating code experiments that draw out the things that make the language unique. Swift makes some fascinating decisions about mutability, null checking, type inference, polymorphism, compiler optimization, and static ↔︎ dynamic type interactions that challenge long-standing language design traditions.

This session is also a meditation on how languages shape the code we write. More than just enumerating features, I’ll talk about how language differences shape code style and best practices. What does it feel like to code in this language? How do different languages lead to code differences that run deeper than syntax? I’m interested in whether and how the Sapir-Whorf Hypothesis applies to programming: does changing how we code alter how we think?

There will be comparisons with Ruby, Javascript, Java, Objective-C, and C++, as well as some shout-outs to functional languages. (Don’t worry; you don’t need to know all those to follow the talk.) NB: This is a tribalism-free zone; we’re here to consider tradeoffs, not cheer for our favorite language as if it were a sports team!


Paul Cantrell

Paul fell in love with programming at first sight on an Apple ][+ and never looked back. He teaches computer science at Macalester College and is a freelance software developer (often with the fine folks at Bust Out).

Living a secret double life as a classically trained composer and pianist and artistic director of The New Ruckus, he brings a musician's passion for aesthetics and nuanced detail to the craft of writing software, thus making his bio sound all fancy.