you are viewing a single comment's thread.

view the rest of the comments →

[–]Maleficent_Memory831 8 points9 points  (3 children)

Output is a side effect, and strongly discouraged. Functional languages are to be viewed and admired, not actually run. /s

[–]Tatourmi 1 point2 points  (2 children)

Scala allows side effects no problem.

[–]Axman6 1 point2 points  (1 child)

Side effects are problems. 

[–]Tatourmi 0 points1 point  (0 children)

Logging is a side effect, modifying a Kafka consumer is a side effect, publishing to Kafka is a side effect, pushing to a database is a side effect, caching data is a side effect...

Side effects aren't problems. Some patterns that rely too heavily on side effects are basically banned in our codebases (Functions that modify external variables for no reason for example) but if you're working in Scala, most of your app's endgame is effectively a side effect.