Functional Programming in Go with Generics

Functional programming is an increasing popular programming paradigm with many languages building or already supporting it. Go already supports some of these features such as first-class and higher order functions and enabling functional programming.

One key feature that’s been missing from Go is generics. Without this feature, functional Go libraries and applications are forced down one of two paths: type safe + use-case specific or type-unsafe + use-case agnostic. With the upcoming release of Go 1.18 in early 2022, generics are expected to be added to the language which will enable new sorts of functional programming solutions in Go.

In this article, I’ll cover some background on functional programming, survey functional programming landscape today in Go, and discuss features planned for Go 1.18 and how they could enable functional programming.

Read in full here:

https://ani.dev/2021/05/25/functional-programming-in-go-with-generics/

This thread was posted by one of our members via one of our news source trackers.

2 Likes