0% found this document useful (0 votes)
2 views

1 Introduction to Functional Programming

Haskell is a purely functional programming language that emphasizes modular programming, ease of maintenance, and debugging. It features characteristics such as immutability, referential transparency, and lazy evaluation, along with static typing and automatic currying. Haskell also includes advanced features like garbage collection and Software Transactional Memory for improved concurrency management.

Uploaded by

chagwenac
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

1 Introduction to Functional Programming

Haskell is a purely functional programming language that emphasizes modular programming, ease of maintenance, and debugging. It features characteristics such as immutability, referential transparency, and lazy evaluation, along with static typing and automatic currying. Haskell also includes advanced features like garbage collection and Software Transactional Memory for improved concurrency management.

Uploaded by

chagwenac
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 7

INTRODUCTION TO

HASKELL
Functional Programming CUCE211
Topics
• About Haskell
• Characteristics of Haskell
• Haskell Features
About Haskell
• Purely functional programming language.

• Functions are the primary citizens of Haskell.

• Promotes advantages of modular programming such as


ease of maintenance and debugging, scalability and
reuse.

• Defining characteristics guide how code should best be


written or how certain solutions should be designed.
Characteristics of Haskell
• Haskell is purely functional: You tell the computer what something IS, and not
what /how to do. For example, the product of 10 numbers is the first number
multiplied by the product of the remaining 9 numbers.

• Functions have no side-effects. Each function fulfils its obligation and returns a
result.

• Functions have referential transparency. Each function is consistent in the


results it produces for the same set of values.

• Immutability. Setting a variable to a certain value makes that variable constant.

• Modularisation. Bigger functions can be built by putting together several


functions.

• Lazy evaluation: functions are executed only when required by the user.
• Haskell deals well with infinite lists and infinite structures
Some Haskell Features
• Static typing

• Polymorphisms

• Type inference – Concrete types are deduced by the type


system where-ever it is obvious

• Layout-sensitivity

• ML (Meta Language) syntax

• Automatic currying
Some Haskell Features (1)
• Garbage collector - Garbage collection moves responsibility
for many memory issues from the developer into the
language's runtime,

• Green threads – Instead of requiring the developer to


manually deal with asynchronous (or non-blocking) I/O calls,
the runtime system takes responsibility for this

• Software Transactional Memory (STM) - An abstraction for


concurrent communication that increases
composability and modularity, where concurrent abstractions
can be easily composed with any other abstraction built using
STM, without exposing the details of how the abstraction
ensures safety.
Next

Let’s Explore Haskell

You might also like