# A Taste of Haskell

DevFeed: [A Taste of Haskell](<https://devfeed.tech/articles/a-taste-of-haskell-30804.md>)

Original publisher: [Read original article](<https://hookrace.net/blog/a-taste-of-haskell/>)

Published: 2016-10-20T22:00:00Z

Content type: article

Language: en

Sources: [Dennis Felsing](<https://devfeed.tech/sources/dennis-felsing.md>)

Topics: [Haskell](<https://devfeed.tech/topics/haskell.md>), [Functional programming](<https://devfeed.tech/topics/functional-programming.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>)

Tags: [compiler](<https://devfeed.tech/tags/compiler.md>), [functional-programming](<https://devfeed.tech/tags/functional-programming.md>), [haskell](<https://devfeed.tech/tags/haskell.md>), [java](<https://devfeed.tech/tags/java.md>), [programming](<https://devfeed.tech/tags/programming.md>)

## AI overview

An introductory article exploring Haskell through comparisons with Java, explanations of functional programming, and interactive examples using the Glasgow Haskell Compiler. It describes Haskell as purely functional, lazily evaluated, statically typed, and equipped with type inference.

## Source excerpt

In this post I want to highlight a few fun aspects of the Haskell programming language. The purpose is to give you a taste of Haskell so that you will want to learn more of it. Don't consider this as a tutorial or guide but rather as a starting point, as it is based on a short talk I held at work, which in turn is based on my favorite material from holding practical courses about Haskell at university. Let's start by seeing how programmers compare Haskell to a mainstream programming language, for example Java: Image Source: Hammer Principle Doesn't sound that good for Java, what do people say about Haskell? Image Source: Hammer Principle Sounds much better and makes it seem like a reasonable endeavour to learn Haskell! So what is Haskell actually? Haskell is a purely functional, lazily evaluated, statically typed programming language with type inference. While this definition sounds complicated you should understand more of it after reading this post. Let's start with the basics: What's the difference between an imperative programming language and a functional one? In imperative programming the basic operation is changing a stored value. In functional programming the basic operation is applying a function to arguments. Haskell itself was designed in 1990 by a scientific committee with the purpose of being a basis for functional programming research. The Glasgow Haskell Compiler (GHC) is the most popular implementation and the one we will be using. You can get it as part of the Haskell Platform as well. Haskell code can be compiled (ghc), but also interpreted (ghci, interactive). In the rest of this blog post we will look at some key features of Haskell interactively, so you can get your own installation of GHC and follow along and experiment with the code. Arithmetic I belive that the best way to learn a programming language is by playing around with it. So that's what we're going to do now. I'll show a few examples and explain the cool Haskell features that we enco