Compose :: Melbourne Speaker - Rahul Trikha


Compose :: Melbourne will feature many excellent speakers. One of this year's lineup is Rahul Trikha. If you want to see the whole lineup look here!




11am - Rahul Trikha

From JavaScript to PureScript

Functional programming techniques have been making appearances in JavaScript for some time now. However, functional programming in JavaScript has some disadvantages: JavaScript is verbose, untyped, and lacks powerful forms of abstraction. Unrestricted JavaScript code also makes equational reasoning very difficult. A functional JavaScript programmer must stay sharp at all times to create pure functions that avoid side effects. However, this puts too much cognitive load on the programmer.

PureScript, on the other hand, is a Haskell-inspired statically typed language which aims to address these issues. It features lightweight syntax, which allows developers to write very expressive code which is still clear and readable. It uses a rich type system to support powerful abstractions. It also generates fast, understandable JavaScript code, which is important when interoperating with other JavaScript libraries. PureScript strikes a very practical balance between the theoretical power of purely functional programming and the fast-and-loose programming style of JavaScript.

The idea behind this talk is to encourage developers to build real-world applications using PureScript. I hope to take you through a journey of applying functional patterns to everyday problems so that you can appreciate the simplicity and ideas behind these patterns:

  • Algebraic data types and pattern matching
  • Row polymorphism and extensible records
  • Higher kinded types
  • Type classes with functional dependencies
  • Higher-rank polymorphism

About Rahul Trikha

Rahul works as a Technical Lead at REA Group building micro services to power their backend systems. He uses Ruby by day and Haskell/PureScript by night. He enjoys learning more about functional patterns and becoming a better dev through applying them in his everyday code.