Upgrade to Pro — share decks privately, control downloads, hide ads and more …

My First Experience With Functional Programming

My First Experience With Functional Programming

Personal experience on functional programming

Arkar Min Aung

November 15, 2014
Tweet

More Decks by Arkar Min Aung

Other Decks in Programming

Transcript

  1. λ

  2. Imperative Programming Telling the machine HOW to do something, and

    as a result what you want to happen will happen.
  3. Declarative Programming Telling the machine WHAT you would like to

    happen, and let the computer figure out how to do it.
  4. If, y = sin (x) and, x = π y

    = sin (π) It does not make sense to do x = x + 1 you cannot change the state of x
  5. My friend introduced me “Bro, this thingy called FP is

    sooo awesome that it will blow your mind on many levels”
  6. I love Mathematics I love it when a language gives

    me Integer size which can grow as big as the resources allow
  7. – Alan J. Perlis “A language which does not change

    the way you think is not a language worth learning.”
  8. – Alan J. Perlis “A programming language is low level

    when its programs require attention to the irrelevant.”
  9. So what lang did I choose to learn FP? A

    programming language should just be a tool for you to complete some task. There is no point fighting over what is better and what is not.
  10. Oh yeah! Recursions • GNU • GNU is Not Unix

    • ((GNU is Not Unix)NU) is Not Unix • …
  11. • Args to a function are evaluated only when needed

    for the computation. • Very useful for dealing with very large or infinite streams of data. • Opposite to eager evaluation
  12. So • Imperative Languages: • Efficient execution • Complex syntax

    • Concurrency is programmer designed • Functional Languages: • Inefficient execution • Simple syntax • Programs can automatically be made concurrent
  13. Questions please? or comments? Even if you don’t get stuffs

    in this talk, it is my fault for not being able to explain better. Please don’t feel bad.