3 ms·
Geniune question: Can you name any complex software that is written in pure functions? This is not a "discussion" question, but a "fill my blind spot" question
by koonsolo 5y ago
Geniune question: Can you name any complex software that is written in pure functions?
This is not a "discussion" question, but a "fill my blind spot" question.
I always read how good FP is, and how much better it handles all the complexity. Yet I never see it win from software written with state.
Is there any big and/or complex sofware written in FP that I am overlooking?
- whateveracct 5y agoVarious classical optimization problems are just pure functions. The sorts of things used all over the place in industry (supply chain ops for instance) If you want real production software, Starbucks Rewards is/was powered entirely by pure Haskell code and made big bucks Software having complex state actually makes Haskell even better than the competition. Because most state has nuanced rules about its state transitions. Haskell definitely has more of a learning curve when it comes to dealing with state, but that curve will guide you towards a ceiling mainstream languages can't even approximate.
- gen220 5y agoMany banks and hedge funds are semi famously using FP (whether that’s OCaml, Haskell, or Scala). JP Morgan has a big Haskell corner. Jane St is the company I most associate with with OCaml. Jet.com is largely built with F#. In business domains with strict audit requirements, it’s a peace of mind thing, to know that “side effects” (aka persistence and the mutation of persisted data) are constrained to a tiny and highly testable corner of your code base. For OSS, the examples that spring to mind for me are RabbitMQ (Erlang) and Pandoc (Haskell).