3 ms·
Controlling state the way functional languages do makes code significantly easier to test. Besides this, functional languages have many great features such as s
by seanwilson 11y ago
Controlling state the way functional languages do makes code significantly easier to test. Besides this, functional languages have many great features such as strong typing, pattern matching and inductive types that have yet to be adopted by any mainstream languages.
- chvid 11y agoDon't get me wrong; I think "no side effects" is a very useful way of programming for a large number of problems. But not all problems. In particular problems related to user interface and system integration. And languages I listed (JavaScript, C#, Swift and Java) have all stolen large chunks of ideas pioneered by functional programming and put it into their latest release.
- tombert 11y agoIf you take a language like Haskell, you can utilize an FRP framework like Netwire to write pure-ish code whilst having reactive things. I'm currently writing an ncurses application that does exactly that.
- davexunit 11y agoStatic typing is not a requirement for a functional programming language.
- lmm 11y agoIt's a requirement for being able to write library functions that work with custom effects, which is perhaps the biggest advantage of a functional programming language.