An Intro to Haskell

Jenn Schiffer
CSS Perverts
Published in
3 min readJun 5, 2015

--

For JavaScript Engineers

JavaScript has been around for a long time; it basically powers all of the important parts of the Web. Because of this, most software engineers tend to focus on JavaScript as their expertise and miss out on newer languages.

The problem with programming languages is that there are so many of them, it is difficult to choose. When I ran into this problem, I searched the Web for answers.

The only real programming language to come up in my results, as you can see above, was a “new thing” called Haskell. It turns out that this really is the best language to look into post-JavaScript, as it is also functional. It is really simple to get into, so here is a really simple tutorial to becoming a Haskell developer after doing JavaScript all this time.

1. Download Haskell

You can get Haskell for free by going to https://www.haskell.org/platform/ and choosing which operating system you use. As a Mac user, I clicked the Apple symbol. There are some prerequisites to installing Haskell that you may not be used to with JavaScript, since JavaScript just works:

“The command line development tools are required prior to installation.
If you have /usr/bin/ld available in a shell, you should be good to go. If not: On OS 10.7 or later, choose one of the following:Download and install Command Line Tools for Xcode. Despite the name, you don’t need Xcode installed!After installing Xcode (4.3 or later), choose Preferences, then pick the Downloads panel. There you can download and install the Command Line Tools as an optional component. This installs the same package as listed in the above option. If you have Xcode prior to 4.3, depending on how you installed it, you may already have the command line tools. If not, consider the first option above. On OS 10.6, 32-bit, use Xcode 3.2 or later: Choose the “Customize…” button during installation and choose UNIX Development. 64-bit version requires Xcode 4.1 or later. The command line tools and/or Xcode can be downloaded for free from Apple’s developer website, you do need to register as a developer (also free).”

Many JavaScript developers wonder what Haskell is actually useful for. Believe it or not, it’s a standardized, general-purpose purely functional programming language, with non-strict semantics and strong static typing.

Haskell is named after logician Haskell Curry. Therefore through logic, Haskell is a language by a logician and is likely good for logical problems.

https://wiki.haskell.org/The_JavaScript_Problem

One of the cool things about Haskell is the community and documentation. The Haskell Wiki is full of great information about the language itself and what it can be used for. As far as I can tell, there is nothing quirky at all about the compiler and, also, the Web is full of code samples to learn from.

So as you can see, Haskell is a great new language to dive into after working with JavaScript. Although you may not be used into installing software to write and run code, it’s a small roadblock to get through to be more open-minded as an engineer. A Haskell engineer.

Jenn Schiffer is an engineer of many languages and writer about all the other ones. She is very skinny in that she is covered in skin.

--

--