Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
My First Experience With Functional Programming
Search
Arkar Min Aung
November 15, 2014
Programming
0
96
My First Experience With Functional Programming
Personal experience on functional programming
Arkar Min Aung
November 15, 2014
Tweet
Share
More Decks by Arkar Min Aung
See All by Arkar Min Aung
From Raw to insight: Taming Streams of IoT Data
arkaung
0
78
Open Education Platform
arkaung
0
32
Other Decks in Programming
See All in Programming
障害対応を起点としたもっといい開発と運用のサイクル作りのためにできること / Hatena Enginner Seminar #29
polamjag
0
240
見た目から始める生産性向上
ikumatadokoro
8
930
単体テストを書かない技術 #phpcon_odawara
o0h
PRO
27
8.3k
[技育CAMPアカデミア]アイディアを形に!【超入門】スマホアプリ開発〜リリースまでの流れをご紹介
teamlab
PRO
0
380
Code Reviews
bkuhlmann
4
890
Snowflakeで眠ったデータを起こそう!
estie
0
120
スクラムガイドのスプリントレトロスペクティブを改めて読みかえしてみた / Re-reading the Sprint Retrospective Section in the Scrum Guide
mackey0225
3
450
PHPはいつから死んでいるかの調査
chiroruxx
1
400
0→1と1→10の狭間で Javaという技術選定を振り返る/Reflecting on the Decision to Choose Java Between Scaling from 0 to 1 and 1 to 10
jaguar_imo
2
390
使ってみよう Azure AI Document Intelligence
kosmosebi
2
330
Rubyでたのしむクリエイティブコーディング/Enjoy Creative coding with Ruby
chobishiba
1
180
二郎系ラーメンのコールで学ぶ AST 解析
memory1994
PRO
7
1.7k
Featured
See All Featured
Designing with Data
zakiwarfel
96
4.8k
The Mythical Team-Month
searls
216
42k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
79
43k
Rebuilding a faster, lazier Slack
samanthasiow
73
8.2k
Documentation Writing (for coders)
carmenintech
60
3.9k
Creatively Recalculating Your Daily Design Routine
revolveconf
210
11k
Navigating Team Friction
lara
178
13k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
7
1k
From Idea to $5000 a Month in 5 Months
shpigford
377
45k
Bootstrapping a Software Product
garrettdimon
PRO
302
110k
How to name files
jennybc
65
93k
How To Stay Up To Date on Web Technology
chriscoyier
782
250k
Transcript
λ
My Experience with Functional Programming Arkar Min Aung iOS Dev
(Nex)
Actually, I am a complete n00b in FP Please excuse
me if I say some stuffs wrong
WHAT IS Functional Programming?
Imperative Programming Telling the machine HOW to do something, and
as a result what you want to happen will happen.
Declarative Programming Telling the machine WHAT you would like to
happen, and let the computer figure out how to do it.
Functional Programming != Functional Programming Language
Functional Programming is inspired by Mathematics
Everything is a function (x) = x+2 (x) = sin(x)
Values are “Immutable”
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
Functions without side-effects
Referential Transparency
Functions are first class citizens
Higher Order Functions Functions which take other functions as args
e.g differential -> d/dx (x^2) = 2x
WHY Functional Programming?
My friend introduced me “Bro, this thingy called FP is
sooo awesome that it will blow your mind on many levels”
Curious
I love Mathematics I love it when a language gives
me Integer size which can grow as big as the resources allow
– Alan J. Perlis “A language which does not change
the way you think is not a language worth learning.”
– Alan J. Perlis “A programming language is low level
when its programs require attention to the irrelevant.”
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.
Haskell
Recursion To iterate is human, to recurse divine
Oh yeah! Recursions • GNU • GNU is Not Unix
• ((GNU is Not Unix)NU) is Not Unix • …
Pattern Matching
Purity
Lazy
• 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
Concurrent
So • Imperative Languages: • Efficient execution • Complex syntax
• Concurrency is programmer designed • Functional Languages: • Inefficient execution • Simple syntax • Programs can automatically be made concurrent
My sole purpose
:) Thank you so much
λ @ark_aung @khzaw Ko Thura Hlaing github - trhura
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.