What the heck is Haskell

in #steemit7 years ago (edited)

Note : Got bored of all the cryptocurrency and blockchain posts and just realised that there are no/very few programming posts on steemit, so thought of writing one, in hope of expanding the user base of steemit.

haskell-logo.png

Basically, Haskell is a functional programming language. Haskell is the purest functional programming language. Haskell programs are a series of high-level generalizable functions that define what the program is intended to do, letting lower layers (compiler, runtime, and libraries) handle mundane low-level details such as iteration. ( Didn’t get it, see the example below ).

For understanding Haskell, you need to know about functional programming first. The functional programming paradigm was explicitly created to support a pure functional approach to problem solving. It means programs written in functional programming languages consists of set of functions to be executed. ( Kind of encapsulation in object oriented programming — dividing a program into functions ).

Basically, functional programming is a form of declarative programming. In contrast, most mainstream languages, including object-oriented programming (OOP) languages such as C#, Visual Basic, C++, and Java, were designed to primarily support imperative (procedural) programming.

If you have done programming before, chances are that you have done imperative programming, not functional programming. With an imperative approach, a developer writes code that describes in exacting detail the steps that the computer must take to accomplish the goal. This is sometimes referred to as algorithmic programming.

On the other hand, in functional programming approach, you use high-level generalizable functions that define what the program is intended to do, letting lower layers (compiler, runtime, and libraries) handle mundane low-level details such as iteration.

Let’s take an example: Create a list of all even numbers up to 100, and another list omitting the first five of them.

1_qlGaX5-XaRAgOXSOYARpoQ.png

Here in Haskell you don’t have to write loops as they are implemented by lower layers (compiler, runtime, and libraries).

Where it came from?

Haskell was designed by a committee which published the Haskell 1.0 specification in 1990. It named the language after Haskell Curry, an influential logician.

Where it can be used?

Haskell is good for graphics, networking, systems programming, data structures, databases, development, text processing.

Haskell is really strong at areas and problems where correctness matters, domain specific languages, and parallel and concurrent programming.

What are the advantages of learning?

If you know any of the mainstream languages ( imperative and object oriented languages ) for example C, Java, python, etc. it will be a new and different experience learning Haskell or any functional programming language in general. It will improve your programming skills for the better. Thinking “functionally” lets you write more efficient code even in imperative languages, since you essentially decompose your algorithms into blocks that are easy to reason about. So even if you never end up using functional programming, learning it teaches you new ways to think.

It is not used at very large scale in industry so it might not get you a job but it is definitely worth learning.

Industry adoption

In industry it is being used for various areas like DSLs, web apps, compiler design, networking, analysis, systems programming, etc.

Haskell has a diverse range of use commercially, from aerospace and defense, to finance, to web startups, hardware design firms and lawnmower manufacturers.

Haskell has various other features like it is statically typed and lazy.

Made your mind to learn Haskell or want to know more about it, head over to : https://www.haskell.org/ .

Thanks.

Coin Marketplace

STEEM 0.21
TRX 0.20
JST 0.033
BTC 93097.49
ETH 3121.46
USDT 1.00
SBD 3.04