Most Scala programmers are probably just maintaining Play apps or using Apache Spark, with no pure FP in sight. The pure FP contingent is just very active and vocal online.
Most Scala programmers are probably just maintaining Play apps or using Apache Spark, with no pure FP in sight. The pure FP contingent is just very active and vocal online.
Every time you dare use something as impure as a mutable object, or a non-const reference (so var instead of val), or even want to look up an item in a collection by index (unsafe operation since it will throw exception if index >= length) you'll have to prepare for a heckling from your team mates. Anyone you might ask help from online will first look down their nose at you for even wanting to do something so despicable, and you'll have to humour them with "well yes oh great FP lords, I know that this is really really bad I know, but I have to for .... reason, please help me anyways!".
I think it’s less of an issue at large companies like Twitter, Asana, Databricks, etc, which overall probably employ most working Scala programmers but not the most vocal.
Spark (and Kafka too maybe) are outliers here.
throw exception
This is a good example. It is really important to be very clear from Day 1 how to handle errors in a project. One hybrid choice that is popular is: use exceptions for errors that you cannot recover from, use Options for local error handling.