From Java to impure Scala to pure Scala to Haskell
Goal: Haskell is a notoriously difficult language to teach. Yet its qualities make it desirable to become known to and understood by software developers. With this approach, we take a simple project in Java, convert it to non-functional Scala, convert this to purely functional Scala and from there to Haskell. The goal is to facilitate the process of teaching and learning Haskell, and to make software developers curious about it.
This will be done in a workshop with one or two sessions for around 1-2 hours each.
The idea is to implement a finite state machine. The impure implementations should change a mutable state of the machine representation on state transitions. The pure implementations should provide a new representation of the state machine after a transition.
Requirements: Standard Java and Scala working environment, Minimal or Stack Haskell installation. https://www.haskell.org/downloads#minimal https://www.haskell.org/downloads#stack
Next step:
- provide signatures of the methods / functions to be used
- define the necessary data types on the purely functional side
- scaffold Java classes
- scaffold Scala classes for both pure and impure approach
ResearchGate URL: https://www.researchgate.net/project/From-Java-to-impure-Scala-to-pure-Scala-to-Haskell
Please note that access to ResearchGate is restricted to members of scientific institutions.