This event has ended. View the official site or create your own event → Check it out
This event has ended. Create your own
View analytic
Sunday, November 13 • 11:40am - 12:20pm
Don’t Blow Your Stack: Recursive Functions for Beginners in Scala

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

Recursion is a fundamental building block of algorithmic design and a corner stone of many functional data structures. The Scala compiler has direct support for tail recursion and indirect support for mutually recursive function calls with a compiler plugin. So what makes a function recursive and what shape must it have to allow for tail call elimination? For that matter, what is tail call elimination? What does it mean to be mutually recursive? How does all this get translated into working, non-stack blowing code at compilation time? In this beginner-friendly look at all things recursion we’ll show how to take an imperative function and transform it into a recursive function. Through live code examples, attendees will see how to keep code referentially transparent without the need for external mutable variables while correctly handling state between “loops." Finally, we’ll introduce a new compiler plugin that adds mutual tail recursion and demonstrate how it can simplify complex, twisted logic.

avatar for Owein Reese

Owein Reese

A hands on manager who continues to write code at work and in his spare time. His group is distributed across the country and he loves being able to work and hire anyone from anywhere. At MediaMath, they are responsible for globally deployed systems capable of handling peak traffic of 1.7M req/s in aggregate, with a mix of both I/O and CPU bound services. | | Besides writing code, he enjoys wind surfing and flying airplanes. Ask him about... Read More →

Sunday November 13, 2016 11:40am - 12:20pm

Attendees (27)