Please log in to watch this conference skillscast.
What happens when you try to apply Scala to projects that seem bad candidates for a functional approach–due to their computational intensity or the nature of their domain? Two attempts at such 'inappropriate' applications will serve as examples: an MP3 decoder and a Game Boy emulator, both written entirely in Scala and sticking as far as possible to functional principles.
Developers considering attacking such problems with a functional language may wonder about performance, the look of the resulting code or simply why they would want to do it that way. The personal experiences and lessons learnt from these endeavours may shed some light.
Both projects are intentionally exaggerations of what one might want to use Scala for in practice, but even as learning projects, there are points of wider interest: how functional purity can be usefully sacrificed in the worst bottlenecks, how design of types is key to performance, and how expressing a problem functionally, despite the toil, is possible and satisfying and very often makes it clearer.
In getting both of these applications to work Danielle also hopes to give counterexamples to the perception held by some that Scala is necessarily slow, inefficient or uncool.
YOU MAY ALSO LIKE:
- Cobind and Chill (SkillsCast recorded in December 2018)
- Lightbend Akka for Scala - Professional (in London on 11th - 12th November 2019)
- Modern development with Java (in London on 9th - 11th December 2019)
- Scala eXchange London 2019 (in London on 12th - 13th December 2019)
- Scalax2gether Community Day 2019 (in London on 14th December 2019)
- The Five Stages of Data: a holistic approach to data analytics and BI (in London on 21st October 2019)
- Code Kata: Yilin Wei - Optics with Monocle (in London on 22nd October 2019)
- Higher-Order Type-Level Programming (SkillsCast recorded in October 2019)
- Stick to Simple Haskell (SkillsCast recorded in October 2019)
'Inappropriate' applications for Scala
Danielle took up functional programming in Scala a few years back as a mental challenge and much enjoyed it since, with gratitude to the great people she met on the way. Alongside Scala being the day job, she has an amateurish inclination to look at unusual domains with FP in the misguided conviction that there has to be a 'clever' solution for every problem.