DEV Community

Discussion on: Golang or Rust, that is the question.

gabrielfallen profile image
Alexander Chichigin

I guess what I'm trying to say is that FP is not a silver bullet. What really matters is clear understanding of the problem and the solution, and good modular and composable design.

Pure FP languages like Haskell do nudge you in that direction first, because pure functions are the most composable thing in our arsenal, second through culture and mechanisms of algebraic design. But all of that takes you only this far. If you really want to go an extra mile and produce even better designs for your programs you have to go beyond and above just language mechanisms and learn and think in more abstract terms.

But at that level particular language and even paradigm doesn't matter that much. With clear understanding of both problem and solution, and good design skills and experience one can produce excellent OO design as well as FP design or even just "structural" design in the sense of good 'ol structural programming.

I'm nowhere near that level of qualification but there are great examples of clever and clean design in all that paradigms in all kinds of languages. So if you want to become a better programmer you can do it regardless what language you use.

Though learning a new programming language in unfamiliar paradigm might be eye-opening and mind-bending experience that really helps in becoming a better developer, so I wholly approve! :D

Thread Thread
leob profile image
leob

Ah right, yes I totally agree ... yes ultimately the quality of a system is based on the quality of the analysis and design you do - and based on that analysis and design you can decide on the language, tech stack or tools you want to use - whether that's FP, OO or whatever - I'm sure that there are systems or requirements where FP would NOT be the best option, for instance a static website having hardly any or no business logic ... but yes intellectually learning another language or paradigm can be refreshing and an eye opener.