News for hackers. Stuff that matters.
Re:Go Replaces Interface{} with 'Any' by linkdd on Wednesday December 15, 2021 @01:37PM (#29569892)
It's about function composition.

How do you compose a function that returns an int or an error with a function that takes an int as parameter?

Yes you can split this in multiple steps, or you can use monads to handle the composition for you, making you type less code, giving more information to the typesystem (mypy for python for example) about what is valid and what's not.

This is a completely different programming style, it's functional programming, aka: "how to make functions by composing other functions".

There are no comments on this comment yet.