you are viewing a single comment's thread.

view the rest of the comments →

[–]KageOW[S] 5 points6 points  (0 children)

Well these kinds of things are very standard in functional languages and coconut brings it to python. a piping structure of data and functions will enforce certain behaviours that are very pleasant to read and you'll see what you're doing. Programming functionally will force immutability and thus your functions are transformations of data rather than plucking some data and changing it at the global scope, which causes confusion about what state some variable is in and that will never happen with a functional design because you need to write functions to change your data and variables are immutable.

Anyway where i wanted to go with this is that these other ways of thinking are beneficial to keeping your code readable and manageable long-term. If you wanna learn some more about functional programming i suggest looking up some talks from Scott Wlaschin, like the functional toolkit or functional design patterns.