Gain confidence with Haskell!

Programming languages are interesting things. I really like that we call them “languages”, because it describes the differences between them really well. For example, everything you can express in a Germanic language, you can express in a Romance language, even if it might be considerably more verbose. And speaking in one language might cause you to think about the world in a different way than in another language.

Same with programming languages; each programming language provides different tools to solve problems, and each encourages you to approach a given problem in a unique way. And just like with normal languages, one isn’t better than another. There are always trade-offs. Even Javascript, the oft-ridiculed language, has the benefit of being supported by every major web browser, meaning anyone can run Javascript code on their computer without additional configuration.

My favorite language currently is the “intriguing” Haskell: a lazily-evaluated, functional programming language with a robust and extensible type system. But if I weren’t using Haskell, I would probably reach for Python. It’s easy to understand and flexible enough to do what I want it to do with minimal effort. These are all good things; as a programmer, you want to use tools and languages that make your code understandable and easy to modify.

So why would I reach for Haskell, when Python is easy enough to understand and use? What Haskell provides, in my opinion, is confidence in my code. Specifically, I really love the following features in Haskell, each giving me more confidence in the code I write:

  • Strong type system
  • Data-first approach
  • Referential transparency

Over the next few blog posts, I will be going over each of these points and answer the following questions:

  1. What is X, at a high level?
  2. Why should you care about X? What problem is it trying to solve?
  3. Can you do X with today’s popular languages?
  4. How does Haskell do X? How does it compare with those languages that can do X?

You might be wondering, why am I writing these posts? “Get back to the terrible drawings and iffy explanations on hot topics!” you might say. Primarily, I want to consolidate my thoughts on why I love Haskell, just for myself, so that I can finally put my nebulous affinity towards Haskell into words. It’s always frustrating when people ask why you like something and your ability to speak kinda just leaves you hanging out to dry.

But equally, I also want to highlight some interesting things Haskell brings to the table, especially if you’re only comfortable with languages like Python, Typescript/Javascript, or Java. My hope is that this series can show you a whole new way of thinking about code and programs, and make you even the slightest bit curious about this interesting language (and other languages like it).

Stick around, the first post in the series is coming out soon!

One thought on “Gain confidence with Haskell!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s