Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Functional Design in Go / Boaz Shuster

Functional Design in Go / Boaz Shuster

I got interested in Functional Design after one year of programing in Go. It showed me a new way of writing code.
In this talk I would like to show how using Functions can create a declarative, composable and testable code without much of an effort.

Before I programmed in Go I wrote a lot Python code and was used to the OOP world. You can realize how overwhelmed I was when I joined to a new team programming in Go which later turned to be interesting and satisfying.
I had to get use to the idea of composition (vs. inheritance), high-order-functions and writing a declarative code.
In this session I would like to demonstrate those patterns: 1. What are closures and how we can use them to our benefit 2. How using interfaces and functions make the code more testable and composable 3. Channels and declarative code using functions

GopherCon Israel

February 11, 2019
Tweet

More Decks by GopherCon Israel

Other Decks in Programming

Transcript

  1. “A language that doesn't affect the way you think about

    programming, is not worth knowing” - Alan Perlis
  2. References • Embrace the interface by Tomas Senart • Do

    not fear first class functions by Dave Cheney • Functional options for friendly API by Dave Cheney