functional programming in an imperative worldsddconf.com/brands/sdd/library/functional... · down...
TRANSCRIPT
![Page 1: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/1.jpg)
Functional Programming in an
Imperative World!
Michael Newton @mavnn
Character illustrations: Storn Cook, Creative Commons: Attribution-NonCommercial-ShareAlike 2.5 see http://www.enworld.org/forum/showthread.php?161795-Storn-s-art-for-swipin-!/page3&p=2874435&viewfull=1#post2874435
![Page 2: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/2.jpg)
Down in the trenches, the Agents of C# and their VB.net support bots have managed to keep out the dreaded Dr. Bankrupt so far.
But the Market never sleeps, and the challenges are growing. Some of the newer agents speak of super heroes that can be summoned to aid the cause - the Fearsome F#, Erlang the Messenger... if only the sacrifice is made of keeping the code pure.
The Story so far...
![Page 3: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/3.jpg)
Eyjafjallajökull
Setting the Scene
![Page 4: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/4.jpg)
Fear is the Mind Killer
• Change is hard - and risky
• Need to convince:
• Management
• Your peers
![Page 5: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/5.jpg)
![Page 6: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/6.jpg)
Don't confuse me with facts!
[Dan Liu's] post “The Empirical Evidence That Types Affect Productivity and Correctness” summarizes a large set of papers and goes through each one in order to describe what it is trying to measure and how well it does it. In almost every paper, he has valid critique of the experiment, methodology and approach.
The point is that while these papers shows almost no effect in either direction, they are often used to “Justify your view” in one direction or the other.
(https://medium.com/@jlouis666/proglang-design-with-evidence-1444213f3902#.ujwfbigvo)
![Page 7: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/7.jpg)
Dilute the Risk
• Fix the badly broken
![Page 8: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/8.jpg)
<TargetFrameworkProfile></TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
![Page 9: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/9.jpg)
Fake 'n' Shake
![Page 10: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/10.jpg)
Dilute the Risk
• Fix the badly broken
• Pick an interoperable language
![Page 11: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/11.jpg)
Together... They Fight Crime!
![Page 12: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/12.jpg)
C#F#
![Page 13: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/13.jpg)
VB.net
F#
![Page 14: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/14.jpg)
Scala Java
![Page 15: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/15.jpg)
Clojure
Java
![Page 16: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/16.jpg)
Elm
(Your Server)
![Page 17: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/17.jpg)
Do the Impossible!
• What's so risky... it's never been done?
• Can a functional language help?
![Page 18: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/18.jpg)
Do the Impossible!
![Page 19: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/19.jpg)
Type Providers
![Page 20: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/20.jpg)
Pattern Matching
![Page 21: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/21.jpg)
Concurrency
![Page 22: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/22.jpg)
Currying
![Page 23: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/23.jpg)
Metaprogramming
![Page 24: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/24.jpg)
Steal from the Best
• If you can't go to the functional language...
• ...bring the functional concepts to yours
• And then tell people where they came from!
![Page 25: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/25.jpg)
Actors
![Page 26: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/26.jpg)
Property Based Testing
![Page 27: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/27.jpg)
RX Redux
Lambdas
itertools
LINQ
![Page 28: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/28.jpg)
And finally... teach!
![Page 29: Functional Programming in an imperative worldsddconf.com/brands/sdd/library/Functional... · Down in the trenches, the Agents of C# and their VB.net support bots have managed to](https://reader033.vdocuments.net/reader033/viewer/2022042303/5ece398100bbfb522729b077/html5/thumbnails/29.jpg)
Questions??
@mavnn ltd
http://mavnn.co.uk
http://blog.mavnn.co.uk