45 F#antastic minutes!
-
Upload
alex-casquete -
Category
Technology
-
view
129 -
download
0
Transcript of 45 F#antastic minutes!
![Page 1: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/1.jpg)
Getting Started with F#
Alex Casqueteacasquete
45 F#antastic minutes!
![Page 2: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/2.jpg)
Alex Casqueteacasquete
![Page 3: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/3.jpg)
Functional Programming
is not newbut is ignored
until now
![Page 4: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/4.jpg)
Process large datasetsScale to processors & computers
Easily testingDeclarative logic
The Challenges
![Page 5: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/5.jpg)
“Take the next ticket from a list. If theticket is not printed, send to print. If
there are more tickets in the list, go tothe begining.”
![Page 6: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/6.jpg)
“Run the first command for everycustomer for which the second
command returns true.”
![Page 7: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/7.jpg)
“Send to print every ticket that is not printed.”
![Page 8: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/8.jpg)
“Take the next ticket from a list. If theticket is not printed, send to print. If
there are more tickets in the list, go tothe begining.”
“Send to print every ticket that is not printed.”
![Page 9: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/9.jpg)
Thinking difɘrɘntlySay “what” rather than “how”
![Page 10: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/10.jpg)
foreach (Ticket t in Tickets){
if (!t.IsPrinted){
Print(t);}
}
Tickets.Where(t=>!t.IsPrinted).ToList().ForEach(t => Print(t));
Thinking difɘrɘntly in C#
Imperative Declarative
![Page 11: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/11.jpg)
Functional Basic ConceptsDemo: From C# to F#
![Page 12: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/12.jpg)
Functional Basic ConceptsImmutability
RecursionHigher order
![Page 13: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/13.jpg)
10 Reasons not to useFunctional Programming
<ironic>
</ironic>
![Page 14: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/14.jpg)
Reason 1I don't want to follow the latest fad
![Page 15: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/15.jpg)
Reason 2I get paid by the line
I get paid by the line
I get paid by the line
![Page 16: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/16.jpg)
Reason 3{ I love me some curly braces }
![Page 17: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/17.jpg)
Reason 4string s = “I like to see explicit types”;
![Page 18: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/18.jpg)
Reason 5I like to fix vugs
![Page 19: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/19.jpg)
Reason 6I live in the debugger
![Page 20: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/20.jpg)
Reason 7I don't want to think about
every little detail
![Page 21: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/21.jpg)
Reason 8I like to check for != nulls
![Page 22: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/22.jpg)
Reason 9I like to use
design patterns everywhere
![Page 23: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/23.jpg)
Reason 10It's very freaky
![Page 24: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/24.jpg)
Why use F#?The Five C’s
![Page 25: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/25.jpg)
ConcisenessConvenienceCorrectnessConcurrency
Completeness
![Page 26: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/26.jpg)
Understanding F#
![Page 27: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/27.jpg)
Data, Services, Information
Access
Transformations, Analysis,
Algorithms, Code, Parallel
Presentation, Publication, Experience
F# 3.0 F# 2.0 C#, HTML5, JS
![Page 28: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/28.jpg)
Type providersDemo: OData, WSDL
![Page 29: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/29.jpg)
More Resources?
![Page 30: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/30.jpg)
![Page 31: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/31.jpg)
http://Fsharp.org
http://FsharpForFunAndProfit.com
http://www.fssnip.net/
![Page 32: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/32.jpg)
Thanks! Questions?
Alex Casqueteacasquete
![Page 33: 45 F#antastic minutes!](https://reader033.fdocuments.us/reader033/viewer/2022042814/554f5a95b4c905524c8b548a/html5/thumbnails/33.jpg)