SlideShare a Scribd company logo
1 of 37
Download to read offline
Why bother with FP?
Attempt at honest and backed by data answer
Tomasz Borek, 2015
More: https://github.com/LIttleAncientForestKami/why-bother-with-FP
Who am I?
@LAFK_pl
Consultant @
Tomasz Borek
FP is AWESOME!
● „Knowledge of FP is on the verge of becoming
a must-have skill” (DrDobbs)
● „If you don't know it you're not a REAL
programmer” (Devoxx UK 2014 discussion)
– Real Programmers vs Quiche Eaters
● „The smartest programmers I know are
functional programmers.” (Quora)
Why such talk?
FP?
„Mythical Man-Month”,
Frederick Brooks
What will I talk about?
● About myself and the talk
● Better, means?
● The usual claims you hear and data on them
● The not so usual claims, like „good OO”
● So, why bother?
Who here has read?
● Why FP matters
● Out of the Tar Pit
● Can programming be liberated from von
Neumann style?
SORRY!https://lafkblogs.wordpress.com/
2015/03/07/why-bother-with-fp/
https://github.com/LIttleAncientForestKami/why-bother-with-FP
MORE INFO
CONTRIBUTE
Better?
● Languages
● Designed with X in mind
● Is X better?
The usual claims
● It's the FUTURE / NEXT BIG thing
● Changes your thinking / another tool to have
● Shorter / terser code
● More power / Better abstractions / Convenient
● Complexity / State mutation
● Streams / no side-effects
● Reliability / proven
● Concurrency / Multicore
Define: FUTURE
● By fame
– conferences and conference talks
– articles
● By practicality
– market share
– who / where uses
– job offers
● By language popularity / adoption level
The FUTURE by fame
● Conferences?
– Lambda Days
– LambdaCon
– Strangeloop
● Articles:
– Even in mainstream portals
The FUTURE by practicality
● Market share
● Who / where uses
● Domains
● Quality / Quantity
● Job offers
Adoption level?
● Java 8 Lambdas
– Supposed to be in Java 7
● C++
● C#
● Python Clojures
● JVM: Clojure, Scala, etc.
● SQL – long ago
Language popularity
Language popularity in context
Language popularity in context 2
Language popularity: GitHub
Language popularity: GitHub 2
http://githut.info/
Language popularity: Tiobe
● Best source of data for language trends
● Contains:
– What grew most in a year
– Long range trends
– Very long range... (1985)
– Yearly index
● I looked at top 50 languages
Languages across 2014-2015
Place now Previously Language Ratings (%) Change (%)
1 1 C 16,488 -1,85
2 2 Java 15,345 -1,97
3 4 C++ 6,612 -0,28
4 3 Objective C 6,024 -5,32
5 5 C# 5,738 -0,71
6 9 JavaScript 3,514 1,58
7 6 PHP 3,170 -1,05
8 8 Python 2,882 0,72
9 10 VB.NET 2,026 0,23
10 - VB 1,718 1,72
Tiobe ratings
● Query: +"<language> programming"
● 25 search engines
● „The counted hits are normalized for each
search engine for all languages in the list.”
– All languages in the list add up to 100%
● Confidence factor says how many results we
take in (filtering)
FP languages @ Tiobe
● Currently none makes it past 14th place (F#)
● None became „Programming Language of the
Year” (at least not since 2003)
● They hold > 1% rating, except for F#'s 1,179%
● Reigning languages are still C and Java.
● A number didn't made it to top 50 (Erlang)
Summarizing fame
● On the rise – yes
● Dominating, must have – no
– Including the startup advantage somewhat
– Not strong enough market share
– There are some backers though
Thought-bending / Another tool
● General truth:
– Learning shapes mind
– We think in patterns
● Number of personal statements
– „I learned Haskell and I suffer”
– SO questions
● First language FP vs imperative (universities)
● Number of authority statements
– Including from different fields (Miyamoto Musashi)
Shorter / terser code
● No FP book / tutorial / FAQ I found had data
– One or two examples
– „Usually leads to”, „Most of the times it has”
● Examples are just examples
● No studies to prove the claim
● Is shorter really better? (Hint: APL)
● Sometimes used as in...
More power
● More power
● Better expressive power
● Better abstractions
● Convenient for the programmer
● Paul Graham: Blub Paradox
– Ties with „makes you think differently”
The Blub Paradox
● „Programming languages vary in power”
● Who uses Assembly now?
● Blub – middle of language power axis
– Less powerful is obvious
– More powerful is weird
● Why don't you use most powerful language?
– Comfort zone
– Experience
Less bugs!
● Complexity
– Accidental
– Essential
● State = state mutation vs immutability
● Referential transparency, aka no (little) side-
effects
● Papers: yes, studies: no
You can reason about it (algebra of programs)
You can reason about it (algebra of programs)
But you won't
Solves multicore problem
● Immutable
● Less state, less deadlocks
● Referential transparency, aka no side-effects
● Impure things can be contained within pure
(monads)
● Papers: yes, studies: no
Unusual claims
● Hybrid approaches
● How good OOP works similarly to FP
Summarizing
● What is logical, can be inferred:
– Concurrency
– Complexity
● What you can back up with data
– Prooving it (Coq, Yoneda lemma, program algebra)
● What you can argue:
– Power, expresiveness
– Gives you another perspective, changes thinking
● Not really: terser code, market share, popular...
How I see it
● Concurrency is easier
● Less state = less worries
● Makes you into a better programmer
● Streams make for a better thought-flow
● You can reason about it, but will you?
● Yes, on the rise, but not a „must-have”
● More power... well
So, why bother?
Your case, you tell me!
Version 1, WIP
● Work in progress: sorry!
● Next installments: March!
● Info page on my blog:
● Contribute (pull-requests welcome):
https://lafkblogs.wordpress.com/2015/03/07/why-bother-with-fp/
https://github.com/LIttleAncientForestKami/why-bother-with-FP

More Related Content

Viewers also liked

Ukraine, Europe, Russia and V for Freedom
Ukraine, Europe, Russia and V for FreedomUkraine, Europe, Russia and V for Freedom
Ukraine, Europe, Russia and V for FreedomDarius Radkevicius
 
Patterns for JVM languages - Geecon 2014
Patterns for JVM languages - Geecon 2014Patterns for JVM languages - Geecon 2014
Patterns for JVM languages - Geecon 2014Jaroslaw Palka
 
Patterns for organic architecture
Patterns for organic architecturePatterns for organic architecture
Patterns for organic architectureJaroslaw Palka
 
I'm in ur browser, pwning your stuff - Attacking (with) Google Chrome Extensions
I'm in ur browser, pwning your stuff - Attacking (with) Google Chrome ExtensionsI'm in ur browser, pwning your stuff - Attacking (with) Google Chrome Extensions
I'm in ur browser, pwning your stuff - Attacking (with) Google Chrome ExtensionsKrzysztof Kotowicz
 
Killer product - how to make your product noticeable and used by people
Killer product - how to make your product noticeable and used by peopleKiller product - how to make your product noticeable and used by people
Killer product - how to make your product noticeable and used by peopleKrzysztof Piwowar
 
The changing picture of poverty in the UK - Why we need to act now
The changing picture of poverty in the UK - Why we need to act nowThe changing picture of poverty in the UK - Why we need to act now
The changing picture of poverty in the UK - Why we need to act nowjosephrowntreefoundation
 
Sistema nervioso autonomo
Sistema nervioso autonomoSistema nervioso autonomo
Sistema nervioso autonomoSof2
 
Aprovechamiento de pérdidas postcosechas
Aprovechamiento de pérdidas postcosechasAprovechamiento de pérdidas postcosechas
Aprovechamiento de pérdidas postcosechasFUSADES
 
Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?
Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?
Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?Andy Davies
 
Tarea3 de informatiaca aplicada a la educacion
Tarea3 de informatiaca aplicada a la educacionTarea3 de informatiaca aplicada a la educacion
Tarea3 de informatiaca aplicada a la educaciondilenis luisa calvajal
 
Internet de los alimentos
Internet de los alimentos Internet de los alimentos
Internet de los alimentos FUSADES
 
History of fast food in usa
History of fast food in usaHistory of fast food in usa
History of fast food in usaeretumm
 
Taller diseño de plantas
Taller diseño de plantasTaller diseño de plantas
Taller diseño de plantasFUSADES
 
Fusades condena espionaje contra Cámara de Comercio e Industria de El Salvador
Fusades condena espionaje contra Cámara de Comercio e Industria de El SalvadorFusades condena espionaje contra Cámara de Comercio e Industria de El Salvador
Fusades condena espionaje contra Cámara de Comercio e Industria de El SalvadorFUSADES
 

Viewers also liked (16)

Ukraine, Europe, Russia and V for Freedom
Ukraine, Europe, Russia and V for FreedomUkraine, Europe, Russia and V for Freedom
Ukraine, Europe, Russia and V for Freedom
 
Patterns for JVM languages - Geecon 2014
Patterns for JVM languages - Geecon 2014Patterns for JVM languages - Geecon 2014
Patterns for JVM languages - Geecon 2014
 
Patterns for organic architecture
Patterns for organic architecturePatterns for organic architecture
Patterns for organic architecture
 
I'm in ur browser, pwning your stuff - Attacking (with) Google Chrome Extensions
I'm in ur browser, pwning your stuff - Attacking (with) Google Chrome ExtensionsI'm in ur browser, pwning your stuff - Attacking (with) Google Chrome Extensions
I'm in ur browser, pwning your stuff - Attacking (with) Google Chrome Extensions
 
Killer product - how to make your product noticeable and used by people
Killer product - how to make your product noticeable and used by peopleKiller product - how to make your product noticeable and used by people
Killer product - how to make your product noticeable and used by people
 
Jenkins 20
Jenkins 20Jenkins 20
Jenkins 20
 
The changing picture of poverty in the UK - Why we need to act now
The changing picture of poverty in the UK - Why we need to act nowThe changing picture of poverty in the UK - Why we need to act now
The changing picture of poverty in the UK - Why we need to act now
 
Sistema nervioso autonomo
Sistema nervioso autonomoSistema nervioso autonomo
Sistema nervioso autonomo
 
Aprovechamiento de pérdidas postcosechas
Aprovechamiento de pérdidas postcosechasAprovechamiento de pérdidas postcosechas
Aprovechamiento de pérdidas postcosechas
 
Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?
Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?
Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?
 
Tarea3 de informatiaca aplicada a la educacion
Tarea3 de informatiaca aplicada a la educacionTarea3 de informatiaca aplicada a la educacion
Tarea3 de informatiaca aplicada a la educacion
 
Monitoring poverty and social exclusion
Monitoring poverty and social exclusionMonitoring poverty and social exclusion
Monitoring poverty and social exclusion
 
Internet de los alimentos
Internet de los alimentos Internet de los alimentos
Internet de los alimentos
 
History of fast food in usa
History of fast food in usaHistory of fast food in usa
History of fast food in usa
 
Taller diseño de plantas
Taller diseño de plantasTaller diseño de plantas
Taller diseño de plantas
 
Fusades condena espionaje contra Cámara de Comercio e Industria de El Salvador
Fusades condena espionaje contra Cámara de Comercio e Industria de El SalvadorFusades condena espionaje contra Cámara de Comercio e Industria de El Salvador
Fusades condena espionaje contra Cámara de Comercio e Industria de El Salvador
 

More from Tomek Borek

Noc informatyka - co ja wiem o testowaniu
Noc informatyka - co ja wiem  o testowaniuNoc informatyka - co ja wiem  o testowaniu
Noc informatyka - co ja wiem o testowaniuTomek Borek
 
Teaching PostgreSQL to new people
Teaching PostgreSQL to new peopleTeaching PostgreSQL to new people
Teaching PostgreSQL to new peopleTomek Borek
 
Nowoczesne architektury
Nowoczesne architekturyNowoczesne architektury
Nowoczesne architekturyTomek Borek
 
Java tuning on GNU/Linux for busy dev
Java tuning on GNU/Linux for busy devJava tuning on GNU/Linux for busy dev
Java tuning on GNU/Linux for busy devTomek Borek
 
Jvm tuning in a rush! - Lviv JUG
Jvm tuning in a rush! - Lviv JUGJvm tuning in a rush! - Lviv JUG
Jvm tuning in a rush! - Lviv JUGTomek Borek
 
Java Memory Consistency Model - concepts and context
Java Memory Consistency Model - concepts and contextJava Memory Consistency Model - concepts and context
Java Memory Consistency Model - concepts and contextTomek Borek
 
Seeing through the smoke
Seeing through the smokeSeeing through the smoke
Seeing through the smokeTomek Borek
 
AR drone - Polish JUG short demo
AR drone - Polish JUG short demoAR drone - Polish JUG short demo
AR drone - Polish JUG short demoTomek Borek
 
Testing SAAS, how to go about it?
Testing SAAS, how to go about it?Testing SAAS, how to go about it?
Testing SAAS, how to go about it?Tomek Borek
 
Spróbujmy szczęścia bo zaciskanie pięści nie działa
Spróbujmy szczęścia bo zaciskanie pięści nie działaSpróbujmy szczęścia bo zaciskanie pięści nie działa
Spróbujmy szczęścia bo zaciskanie pięści nie działaTomek Borek
 
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...Tomek Borek
 
Lightning talk on Java Memory Consistency Model Java Day Kiev 2014
Lightning talk on Java Memory Consistency Model Java Day Kiev 2014Lightning talk on Java Memory Consistency Model Java Day Kiev 2014
Lightning talk on Java Memory Consistency Model Java Day Kiev 2014Tomek Borek
 
Few words about happiness (Polish talk) / O szczęściu słów kilka
Few words about happiness (Polish talk) / O szczęściu słów kilkaFew words about happiness (Polish talk) / O szczęściu słów kilka
Few words about happiness (Polish talk) / O szczęściu słów kilkaTomek Borek
 
Jak użytecznie, prawdziwie i solidnie odpowiedzieć na pytanie "jak było"
Jak użytecznie, prawdziwie i solidnie odpowiedzieć na pytanie "jak było"Jak użytecznie, prawdziwie i solidnie odpowiedzieć na pytanie "jak było"
Jak użytecznie, prawdziwie i solidnie odpowiedzieć na pytanie "jak było"Tomek Borek
 
It's not always the application's fault
It's not always the application's faultIt's not always the application's fault
It's not always the application's faultTomek Borek
 
To nie zawsze wina aplikacji!
To nie zawsze wina aplikacji!To nie zawsze wina aplikacji!
To nie zawsze wina aplikacji!Tomek Borek
 
Wprowadzenie do optymalizacji wielokryterialnej / Intro to multicriteria opti...
Wprowadzenie do optymalizacji wielokryterialnej / Intro to multicriteria opti...Wprowadzenie do optymalizacji wielokryterialnej / Intro to multicriteria opti...
Wprowadzenie do optymalizacji wielokryterialnej / Intro to multicriteria opti...Tomek Borek
 
Git nie dla początkujących
Git nie dla początkującychGit nie dla początkujących
Git nie dla początkującychTomek Borek
 
Architecture visualizers - tools usability study
Architecture visualizers - tools usability studyArchitecture visualizers - tools usability study
Architecture visualizers - tools usability studyTomek Borek
 
Meta on HCI - keyword analysis and trends
Meta on HCI - keyword analysis and trendsMeta on HCI - keyword analysis and trends
Meta on HCI - keyword analysis and trendsTomek Borek
 

More from Tomek Borek (20)

Noc informatyka - co ja wiem o testowaniu
Noc informatyka - co ja wiem  o testowaniuNoc informatyka - co ja wiem  o testowaniu
Noc informatyka - co ja wiem o testowaniu
 
Teaching PostgreSQL to new people
Teaching PostgreSQL to new peopleTeaching PostgreSQL to new people
Teaching PostgreSQL to new people
 
Nowoczesne architektury
Nowoczesne architekturyNowoczesne architektury
Nowoczesne architektury
 
Java tuning on GNU/Linux for busy dev
Java tuning on GNU/Linux for busy devJava tuning on GNU/Linux for busy dev
Java tuning on GNU/Linux for busy dev
 
Jvm tuning in a rush! - Lviv JUG
Jvm tuning in a rush! - Lviv JUGJvm tuning in a rush! - Lviv JUG
Jvm tuning in a rush! - Lviv JUG
 
Java Memory Consistency Model - concepts and context
Java Memory Consistency Model - concepts and contextJava Memory Consistency Model - concepts and context
Java Memory Consistency Model - concepts and context
 
Seeing through the smoke
Seeing through the smokeSeeing through the smoke
Seeing through the smoke
 
AR drone - Polish JUG short demo
AR drone - Polish JUG short demoAR drone - Polish JUG short demo
AR drone - Polish JUG short demo
 
Testing SAAS, how to go about it?
Testing SAAS, how to go about it?Testing SAAS, how to go about it?
Testing SAAS, how to go about it?
 
Spróbujmy szczęścia bo zaciskanie pięści nie działa
Spróbujmy szczęścia bo zaciskanie pięści nie działaSpróbujmy szczęścia bo zaciskanie pięści nie działa
Spróbujmy szczęścia bo zaciskanie pięści nie działa
 
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...
 
Lightning talk on Java Memory Consistency Model Java Day Kiev 2014
Lightning talk on Java Memory Consistency Model Java Day Kiev 2014Lightning talk on Java Memory Consistency Model Java Day Kiev 2014
Lightning talk on Java Memory Consistency Model Java Day Kiev 2014
 
Few words about happiness (Polish talk) / O szczęściu słów kilka
Few words about happiness (Polish talk) / O szczęściu słów kilkaFew words about happiness (Polish talk) / O szczęściu słów kilka
Few words about happiness (Polish talk) / O szczęściu słów kilka
 
Jak użytecznie, prawdziwie i solidnie odpowiedzieć na pytanie "jak było"
Jak użytecznie, prawdziwie i solidnie odpowiedzieć na pytanie "jak było"Jak użytecznie, prawdziwie i solidnie odpowiedzieć na pytanie "jak było"
Jak użytecznie, prawdziwie i solidnie odpowiedzieć na pytanie "jak było"
 
It's not always the application's fault
It's not always the application's faultIt's not always the application's fault
It's not always the application's fault
 
To nie zawsze wina aplikacji!
To nie zawsze wina aplikacji!To nie zawsze wina aplikacji!
To nie zawsze wina aplikacji!
 
Wprowadzenie do optymalizacji wielokryterialnej / Intro to multicriteria opti...
Wprowadzenie do optymalizacji wielokryterialnej / Intro to multicriteria opti...Wprowadzenie do optymalizacji wielokryterialnej / Intro to multicriteria opti...
Wprowadzenie do optymalizacji wielokryterialnej / Intro to multicriteria opti...
 
Git nie dla początkujących
Git nie dla początkującychGit nie dla początkujących
Git nie dla początkujących
 
Architecture visualizers - tools usability study
Architecture visualizers - tools usability studyArchitecture visualizers - tools usability study
Architecture visualizers - tools usability study
 
Meta on HCI - keyword analysis and trends
Meta on HCI - keyword analysis and trendsMeta on HCI - keyword analysis and trends
Meta on HCI - keyword analysis and trends
 

Recently uploaded

OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburgmasabamasaba
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 

Recently uploaded (20)

OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 

Why bother with FP - Lambda Days, 1st version

  • 1. Why bother with FP? Attempt at honest and backed by data answer Tomasz Borek, 2015 More: https://github.com/LIttleAncientForestKami/why-bother-with-FP
  • 3. FP is AWESOME! ● „Knowledge of FP is on the verge of becoming a must-have skill” (DrDobbs) ● „If you don't know it you're not a REAL programmer” (Devoxx UK 2014 discussion) – Real Programmers vs Quiche Eaters ● „The smartest programmers I know are functional programmers.” (Quora)
  • 4. Why such talk? FP? „Mythical Man-Month”, Frederick Brooks
  • 5. What will I talk about? ● About myself and the talk ● Better, means? ● The usual claims you hear and data on them ● The not so usual claims, like „good OO” ● So, why bother?
  • 6. Who here has read? ● Why FP matters ● Out of the Tar Pit ● Can programming be liberated from von Neumann style?
  • 8. Better? ● Languages ● Designed with X in mind ● Is X better?
  • 9. The usual claims ● It's the FUTURE / NEXT BIG thing ● Changes your thinking / another tool to have ● Shorter / terser code ● More power / Better abstractions / Convenient ● Complexity / State mutation ● Streams / no side-effects ● Reliability / proven ● Concurrency / Multicore
  • 10. Define: FUTURE ● By fame – conferences and conference talks – articles ● By practicality – market share – who / where uses – job offers ● By language popularity / adoption level
  • 11. The FUTURE by fame ● Conferences? – Lambda Days – LambdaCon – Strangeloop ● Articles: – Even in mainstream portals
  • 12. The FUTURE by practicality ● Market share ● Who / where uses ● Domains ● Quality / Quantity ● Job offers
  • 13. Adoption level? ● Java 8 Lambdas – Supposed to be in Java 7 ● C++ ● C# ● Python Clojures ● JVM: Clojure, Scala, etc. ● SQL – long ago
  • 18. Language popularity: GitHub 2 http://githut.info/
  • 19. Language popularity: Tiobe ● Best source of data for language trends ● Contains: – What grew most in a year – Long range trends – Very long range... (1985) – Yearly index ● I looked at top 50 languages
  • 20. Languages across 2014-2015 Place now Previously Language Ratings (%) Change (%) 1 1 C 16,488 -1,85 2 2 Java 15,345 -1,97 3 4 C++ 6,612 -0,28 4 3 Objective C 6,024 -5,32 5 5 C# 5,738 -0,71 6 9 JavaScript 3,514 1,58 7 6 PHP 3,170 -1,05 8 8 Python 2,882 0,72 9 10 VB.NET 2,026 0,23 10 - VB 1,718 1,72
  • 21. Tiobe ratings ● Query: +"<language> programming" ● 25 search engines ● „The counted hits are normalized for each search engine for all languages in the list.” – All languages in the list add up to 100% ● Confidence factor says how many results we take in (filtering)
  • 22. FP languages @ Tiobe ● Currently none makes it past 14th place (F#) ● None became „Programming Language of the Year” (at least not since 2003) ● They hold > 1% rating, except for F#'s 1,179% ● Reigning languages are still C and Java. ● A number didn't made it to top 50 (Erlang)
  • 23.
  • 24. Summarizing fame ● On the rise – yes ● Dominating, must have – no – Including the startup advantage somewhat – Not strong enough market share – There are some backers though
  • 25. Thought-bending / Another tool ● General truth: – Learning shapes mind – We think in patterns ● Number of personal statements – „I learned Haskell and I suffer” – SO questions ● First language FP vs imperative (universities) ● Number of authority statements – Including from different fields (Miyamoto Musashi)
  • 26. Shorter / terser code ● No FP book / tutorial / FAQ I found had data – One or two examples – „Usually leads to”, „Most of the times it has” ● Examples are just examples ● No studies to prove the claim ● Is shorter really better? (Hint: APL) ● Sometimes used as in...
  • 27. More power ● More power ● Better expressive power ● Better abstractions ● Convenient for the programmer ● Paul Graham: Blub Paradox – Ties with „makes you think differently”
  • 28. The Blub Paradox ● „Programming languages vary in power” ● Who uses Assembly now? ● Blub – middle of language power axis – Less powerful is obvious – More powerful is weird ● Why don't you use most powerful language? – Comfort zone – Experience
  • 29. Less bugs! ● Complexity – Accidental – Essential ● State = state mutation vs immutability ● Referential transparency, aka no (little) side- effects ● Papers: yes, studies: no
  • 30. You can reason about it (algebra of programs)
  • 31. You can reason about it (algebra of programs) But you won't
  • 32. Solves multicore problem ● Immutable ● Less state, less deadlocks ● Referential transparency, aka no side-effects ● Impure things can be contained within pure (monads) ● Papers: yes, studies: no
  • 33. Unusual claims ● Hybrid approaches ● How good OOP works similarly to FP
  • 34. Summarizing ● What is logical, can be inferred: – Concurrency – Complexity ● What you can back up with data – Prooving it (Coq, Yoneda lemma, program algebra) ● What you can argue: – Power, expresiveness – Gives you another perspective, changes thinking ● Not really: terser code, market share, popular...
  • 35. How I see it ● Concurrency is easier ● Less state = less worries ● Makes you into a better programmer ● Streams make for a better thought-flow ● You can reason about it, but will you? ● Yes, on the rise, but not a „must-have” ● More power... well
  • 36. So, why bother? Your case, you tell me!
  • 37. Version 1, WIP ● Work in progress: sorry! ● Next installments: March! ● Info page on my blog: ● Contribute (pull-requests welcome): https://lafkblogs.wordpress.com/2015/03/07/why-bother-with-fp/ https://github.com/LIttleAncientForestKami/why-bother-with-FP