Hacker News new | past | comments | ask | show | jobs | submit login
Go is now a functional language (bitfieldconsulting.com)
3 points by gus_leonel on May 24, 2023 | hide | past | favorite | 2 comments



I’ve not used Go. It seems to be built around mutable values though? That seems to argue against it being a functional programming language.

(It’s going to turn out there are as many definitions of FP as there are of OOP, isn’t it?)


It is and it isn't. Using the mutability of values in Go, like in C, is based on the assignment of pointers as needed, making it optional in some sense.

And now due to the inclusion of generics and first class functions, it is possible to use Go in a mostly functional manner much like Python.

So while it may be incorrect to claim that Go is a capital "F" Functional language, it is correct to say that it can be used to write code in a functional paradigm.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: