Before you get too excited and go all functional in Scala you should know that 100% Functional Scala can be serious Memory hog because you are making copies of everything everywhere because functional means immutable data. Be careful with things such as map and flatmap they create lots of extra objects.
Avoiding loops for the sake of Functional programming strictness is a smooth brained action. When programming avoid hype, understand what you are doing, what your goals are and figure out how to get there. Never blindly ride the hype train.
This article lihaoyi points out some of the inefficiencies of Scala collections for example.
Articles
Scala Closures – article about closures in Scala
Pure functions in Scala – Article about what pure functions are in Scala
Basic Functional Programming in Scala – a short article covering some of the basics of Function programming with Scala
Videos
GOTO 2018 • Functional Programming in 40 Minutes • Russ Olsen
Comments
You must log in to post a comment.