Download Haskell programs

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
HASKELL
Sham n Hafiz
What is Haskell?
▪ 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
▪ Its foundation is a strong static type safety and inference system
▪ The compiler enforces the type check and produces clean, concise and correct code with little side effects from the
outset
▪ This jumbled code leads to software that isn't reliable, breaks easily, and filled with bugs
The Advantages
▪ A very powerful language (in terms of features and capabilities) It has functionally the power of C++
matching
- i.e. goodness of Object oriented programming, easy Algorithm
designing and pattern
▪ Development time is less : If we intend to implement the same functionalities in C/C++. It would take much more
time
The Disadvantages
▪ Performance overhead : This language is not suitable for making time critical applications
▪ Learning time is high: Haskell is not as easy to grasp as other languages such as C or Pascal
▪ Lack of widespread implementations : This means that there are less platforms where the code written on Haskell can
be run
Platform Support?
How it Work?
▪ Here's some simple arithmetic :
▪ This is pretty self-explanatory. We can also use several operators on one line and all the usual
precedence rules are obeyed. We can use parentheses to make the precedence explicit or to change it
How it Work?
▪ Here’s the Booleen sample :
▪ Boolean algebra is also pretty straightforward. As you probably know, && means a Boolean and, ||
means a Boolean or Not negates a True or a False