Hi Haskellers)
Oh, no that doesn’t mean anything bad just that the language that we are gonna talk about today is Haskell. So dear Haskeller, this is one language that I have been so excited about, okay all right, Haskell and Julia.
But in this one I am gonna focus only upon Haskell so Julia’s gonna have to wait till next post. But don’t worry, Haskell is definitely gonna keep you busy till the next time.
So, are you rebel ??
Are you one of those who can’t help but do things differently !!
Then, Haskell is just the right language for you. What sets Haskell apart from all the languages that we have talked about so far ?
I am glad you asked.
Haskell is officially defined as being a pure and lazy functional language.
Quite a strange choice of words to define a language, don’t you think. See, let’s talk about Haskell being pure functional language first and then move on to it being a lazy one as well.
The plus point with going functional is that it mirrors the real world languages to quite an extent.
Now that you have some experience coding in languages like :- C and Python, in real life would you ever say something like ( 2 plus 4 minus 6) ?
Or are you more likely to say ( add 2 and 4, then subtract 6) !!
Obviously the second one. And btw the answer would be 0 due to the BODMAS priority rule.
The above example makes it quite clear that we program in a different way than how we think.
So, this is exactly the point at which the functional languages come in. They just mirror our normal thinking pattern to a greater extent and help us be natural. But the caveat being that it takes this line of thought to it’s logical conclusion.
No, there is nothing sinister with this “logical conclusion” but it only indicates that the language makes you think things differently and people who program in these functional languages are more attuned to creative thinking rather than bogged down by the “conventions” of the language.
However, functional languages are the one’s which are used extensively in Artificial Intelligence and it’s not for nothing that the most famous one LISP is said to be a “Programmable Programming Language” !!
To achieve this level of modelling power the usual debt is paid i.e. the speed trade off. And I am more than happy to tell you that the next language that we are gonna discuss i.e. Julia is here to challenge these notions. But more about Julia in later post.
Now for the Lazy part. Well, it basically means that an evaluation is “delayed” till the last moment when the computer is certain that it is “really” gonna have to execute that code. See, how well does it represent the real world=)
And for the people who are suspicious of recommendations by committees ( and rightly so ! ) this one is certainly an exception for during the AI winter i.e. when the research in the field of Artificial Intelligence made relatively fewer advances and the focus of the “industry” turned to more not-productive , not-clever but rather the quantity of code rather than the quality of code the functional languages lost their charm for the “industry-people”.
At that time people who believed in this programming paradigm got together and decided to come up with a functional language which takes the entire paradigm to the next level. Thus was Haskell born.
In retrospect the design recommended by the committee turned out to be like the anticipation of the Gold-rush of the new millenia viz the languages which work well and can be integrated seamlessly with the new CPU with multiple processors once the limit for the maximum efficiency for a single processor had been reached !!
Thus began the project of coming up with the language that adds up the best qualities of the functional languages and which proves adaptable to the future.
Haskell, was born !!
Haskell, was born !!
Hey, there are these two resources that I think you should really check out if you want to explore the language on your own, if you ask me, it’s definitely worth it.
Trust me, read this amazing book and explore the world of Haskell.
Next Stop -> Julia
TIll next time, Folks
Himanshu Sharma.
famous love problem solution babaji
ReplyDelete