3 ms·
It depends on what the meaning of the word 'scale' is. Analytics is definitely using a ton of FP-flavored computation at gigantic scales. The #1 principle of FP
by alquemist 6y ago
It depends on what the meaning of the word 'scale' is. Analytics is definitely using a ton of FP-flavored computation at gigantic scales. The #1 principle of FP is the insistence on computation with no side effects. Relational algebra (SQL, MapReduce, Linq, etc.) is adhering to this principle, making it arguably the most successful application of FP, running some of the largest computations on the planet.
- discreteevent 6y agoThe parent wasn't talking just about scale, but distributed systems at scale. You could argue that making a call to a db is a distributed system but that is usually not what is meant. FP without side effects is excellent for transforming immutable data. History is by definition immutable so it suits that. It doesn't fit quite as well with a distributed system that has changing state, where the current state of the system is the primary concern for users.
- alquemist 6y agoObviously. Yet the 'FP doesn't scale for distributed systems' is too broad. MapReduce / Flume / Spark / BigQuery are distributed systems. What he probably meant is one can't use pure FP for OLTP at scale. This is again a bit too broad, as most systems benefit from having a FP 'business logic' core with some mechanisms to integrate with the rest of the world. Often times distributed systems are build of purely functional layers talking RPC with the lower layers. Even Erlang, the canonical example of 'we really meant actors when talking about objects' is heavily functional in its design. For reference, I use FP as in 'eschew mutable state', and not 'let's use category theory to solve FizzBuzz using compile-time type metaprogramming'.