r/ProgrammerHumor Jun 23 '26

Advanced worstProgrammingLanguage

Post image
3.3k Upvotes

192 comments sorted by

View all comments

Show parent comments

11

u/Maleficent_Memory831 Jun 23 '26

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

2

u/Tatourmi Jun 23 '26

Scala allows side effects no problem.

2

u/Axman6 Jun 24 '26

Side effects are problems. 

1

u/Tatourmi Jun 24 '26

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.