DEV Community

Gishan Chaminga Abeysinghe
Gishan Chaminga Abeysinghe

Posted on

1

Haskell - part 1 - Introduction

When I was doing my master's I learned an alienated programming language. subject name was functional programming. As I am a programming languages enthusiast I just chose the subject without knowing how its gonna be. though I heard its all about a language called Haskell I really didnt bother much to search about it.

So lets come to the Intro.

Haskell is a functional programming language. what? yeah all the other languages also have functions. whats new in here then.

So in haskell everything is a pure function.

okay. what is a pure function?

  • It always gives you the same output when you provide same input.
  • No side effects.

What are side effects then.

  • A side effects are when a function relies on, or modifies, something outside its parameters to do something.

I copied the definition. Anyways I can give you some examples. If you do an API call, IO operation, database calls or even console logs these thing are called as side effects.

So now you might get a doubt on how we can do those side effects.

Actually in Haskell there is a concept called "Monads" to handle it. In a coming blog i will explain how to write a monad. As it has a more learning curve.

This is just a small introduction. will meet the next blog soon. till then enjoy coding.

Cheers!!!

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (1)

Collapse
 
rohanvilloth profile image
Rohan Villoth ā€¢

I remember taking your help for functional programming assignments of our masters. Looking forward to next blog. šŸ‘šŸ¼

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

šŸ‘‹ Kindness is contagious

Please leave a ā¤ļø or a friendly comment on this post if you found it helpful!

Okay