Redefining the future of web development with Haskell by Martin Šošić

August 13, 2024

In the presentation Redefining the future of web development with Haskell, Martin Šošić discusses his background in computer science and programming, with a focus on his experience with various languages including C++, Python, and Haskell. He shares his excitement about functional programming and clean code, and introduces his current project, Wasp, which uses Haskell for web development. Martin also talks about his personal experience with learning Haskell and how it led him to use it for his university projects and eventually start his own company. He discusses the progress of his project, Wasp, which aims to separate web application specifications from implementation, and the decision to use Haskell for building a CI tool and compiler code generator. Martin expresses his enjoyment of Haskell and plans to build solutions for web developers using Haskell, starting with a solution for Vue.js and React. The team is also planning to add Python as a backend and possibly a frontend view in the future.

Redefining the future of web development with Haskell: A comprehensive overview

Introducing Martin Šošić and his journey with Haskell

Martin Šošić, a seasoned programmer with a rich background in languages like C++, Python, and Haskell, began his presentation by sharing his personal journey with Haskell. He was introduced to the language 14 years ago during a university course, and since then, he has been hooked on its elegance and power. Today, Martin is the co-founder of a startup called Wasp, which leverages Haskell to create innovative web applications. His enthusiasm for functional programming and clean code shines through in his work and in the projects he’s involved with.

 

The birth of Wasp and its vision

Wasp, is a web application framework that aims to revolutionize how developers approach web development. Unlike traditional frameworks, Wasp uses a domain-specific language (DSL) designed to separate web application specifications from their implementation. This approach simplifies the development process by abstracting away repetitive tasks, allowing developers to focus on building unique features.

Wasp is currently in beta, with Martin and his brother leading a small but dedicated team. Despite its early stage, Wasp has already garnered significant attention, boasting around 7,000 GitHub stars — a testament to the growing interest in Haskell as a viable language for modern web development.

 

The power of Haskell in web development

One of the key reasons Martin and his team chose Haskell for their project was its ability to provide high-level performance while maintaining clean and maintainable code. Haskell’s strong typing system, immutability, and functional programming paradigms make it an ideal choice for building complex applications that require reliability and scalability.

During the presentation, Martin discussed how Wasp utilizes Haskell’s strengths to create a CI tool and compiler code generator. This tool, known as the V compiler, allows for optimized code generation, offering more control and power than traditional web frameworks. The V compiler is written entirely in Haskell and features an analyzer and generator that work together to produce an intermediate representation called EP specification. This decoupling of the analyzer and generator paves the way for future enhancements and support for multiple frontends.

 

Tackling challenges with Haskell

While Haskell offers numerous benefits, Martin did not shy away from discussing the challenges his team has faced. The smaller ecosystem and limited libraries for cloud computing or data science were some of the hurdles they encountered. However, Martin emphasized that the advantages of Haskell far outweigh these challenges, especially when building tools that require precise compiler knowledge and optimization.

To address these challenges, the Wasp team adopted a “boring Haskell” approach, which involves keeping complex features localized and simplifying the codebase. This approach not only makes it easier for new developers to join the project but also ensures the code remains maintainable in the long run.

 

Community involvement and contributions

Martin is not only passionate about using Haskell in his projects but also about giving back to the Haskell community. He mentioned leading a university course where he teaches Haskell to students, which has been a rewarding experience for him. Additionally, the team has created a Haskell handbook on GitHub, sharing valuable tips and tricks with the wider community.

The Wasp team’s commitment to the Haskell ecosystem is evident in their contributions and the tools they’ve developed. Martin shared an example of implementing a new feature called “strong pet” in a Haskell library and collaborating with the maintainers to fix a bug. These efforts highlight their dedication to improving the language and supporting other developers on their Haskell journey.

 

The future of web development with Haskell

As the presentation drew to a close, Martin reflected on the future of Haskell in web development. Despite some resistance from developers who view Haskell as difficult or incomplete, Martin is confident that the language has a bright future. His team plans to build solutions tailored for web developers, starting with tools for popular frameworks like Vue.js and React.

One of the most exciting aspects of Wasp is its flexibility. While the team currently focuses on React, Node, and Prisma, they have plans to extend support to other frontend and backend languages, such as Python. This flexibility, combined with the powerful capabilities of Haskell, positions Wasp as a promising tool for the next generation of web applications.

 

Conclusion

Martin Šošić’s presentation on Redefining the Future of Web Development with Haskell offers a compelling glimpse into the potential of Haskell as a foundational language for modern web development. Through his work with Wasp, Martin is not only showcasing the strengths of Haskell but also actively contributing to its growth and adoption in the web development community. As Wasp continues to evolve, it will be exciting to see how Haskell shapes the future of web development and what new possibilities it will unlock for developers worldwide.

 

Additional resources

Check out more from the MeetUp Func Prog Sweden. Func Prog Sweden is the community for anyone interested in functional programming. At the MeetUps the community explore different functional languages like Erlang, Elixir, Haskell, Scala, Clojure, OCaml, F# and more.