SlideShare ist ein Scribd-Unternehmen logo
1 von 33
F# AND THE DLR Richard Minerich Senior Researcher at Bayard Rock  F# MVP of the Year RichardMinerich.com
The tools we use have a profound (and devious!) influence on our thinking habits, and, therefore, on our thinking abilities.  -- Edsger Dijkstra
Problems in Modern Programming ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
F# vs Dynamic F# Dynamic Languages Constructs conform to types and are fixed at runtime Types conform to constructs and change at runtime Data is immutable by default Generally data is mutable by default Protection from many kinds of mistakes No protection, even from typos Native interop with existing .NET Programs and Libraries Some work required for interop, but it’s not difficult Somewhat difficult to learn Very easy to learn
What is F#? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
If you love to code, you’ll love F#. Immutable Data Structures Tail Recursion Discriminated Unions Partial Application Function Composition Quotations Computation Expressions Statically Resolved Type Parameters
If you hate to code, you’ll love F#
Functional with Types? Functional + Types
F# is great for… ,[object Object],[object Object],[object Object],[object Object],[object Object]
And has the tools to support it.
Functional Programming in F# ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
F# Programming Paradigms ,[object Object],[object Object],[object Object],[object Object],[object Object]
Recursion and TCO ,[object Object],Function >  let   rec  badfib n =  if  n < 3  then  1  else  badfib (n - 1) + badfib (n - 2);; val badfib : int -> int >  let   rec   fib n1 n2 c =  if   c = 1  then   n2  else   fib n2 (n1 + n2) (c - 1);; val fib: int -> int -> int -> int
Higher Order Functions Pass Functions into Functions Return Functions from Functions Functions and Values are Interchangeable >  let  findBestSort list = if  List.length list < 1000  then  insertionSort else  quickSort;; val findBestSort : 'a list -> ('b list -> 'b list) when 'b : comparison Function Function Value Value Function Function  Function Value is a
Lambda Expressions ,[object Object],>  let  addTwo = ( fun   x -> x + 2);; val  addTwo  : int -> int > List.map ( fun  x -> x * 2) [1; 2; 3; 4; 5] [2; 4; 6; 8; 10] let value = (fun v -> v) myFunc (fun v -> v) arg
Pipelining ,[object Object],> [1; 2; 3; 4; 5] |> List.map ( fun  x -> x * 2) |> List.filter ( fun  x -> x % 3 <> 0);; [2; 4; 8; 10] Data function function function |> |> |> lambda lambda
Matching ,[object Object],match  num with | 1 -> &quot;One&quot; | x when x = 2 -> &quot;Two&quot; | _ -> &quot;Higher than I can count“ match exact case when | | -> variable with function -> function -> function name | -> function name predicate | active pattern
Function Composition ,[object Object],let  addOne x = x + 1 let  addTwo x = x + 2 let  addThree x = x + 3 let  addSix = addOne >> addTwo >> addThree ‘ a -> ‘b ‘ b -> ‘c ‘ a -> ‘c >> =
Discriminated Unions ,[object Object],type name | signature name = name | signature type  Option<'a> = | Some of 'a | None let  printOutput opt =  match  opt with | Some (val) -> printfn “%A” val | None -> printfn “No Value” of of
And More! ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Try writing some AI http://is.gd/SilverlightAnts
Try F# at  tryfsharp.org
Find Some Functional Friends ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Read a Book
What is the DLR? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The DLR is great for… ,[object Object],[object Object],[object Object],[object Object],[object Object]
Dynamic in C#
DLR Architecture
Metaobject Visualization Users and programs interact with metaobjects, not directly with their backing objects as in C#, VB.NET or F#. control create invoke
Silverlight and the DLR
Embedded Languages in Your App
DLR Books and Resources http://www.silverlight.net/learn/dynamic-languages/ http://is.gd/DLRFAQ
Thank You ,[object Object],[object Object]

Weitere ähnliche Inhalte

Was ist angesagt?

History of F#, and the ML family of languages.
History of F#, and the ML family of languages. History of F#, and the ML family of languages.
History of F#, and the ML family of languages. Rachel Reese
 
Python Programming - I. Introduction
Python Programming - I. IntroductionPython Programming - I. Introduction
Python Programming - I. IntroductionRanel Padon
 
Python Introduction | JNTUA | R19 | UNIT 1
Python Introduction | JNTUA | R19 | UNIT 1 Python Introduction | JNTUA | R19 | UNIT 1
Python Introduction | JNTUA | R19 | UNIT 1 FabMinds
 
F# and functional programming
F# and functional programmingF# and functional programming
F# and functional programmingramikarjalainen
 
System Programming Unit IV
System Programming Unit IVSystem Programming Unit IV
System Programming Unit IVManoj Patil
 
Introduction to Python Programming
Introduction to Python ProgrammingIntroduction to Python Programming
Introduction to Python ProgrammingAkhil Kaushik
 
Python programming introduction
Python programming introductionPython programming introduction
Python programming introductionSiddique Ibrahim
 
C programming interview questions
C programming interview questionsC programming interview questions
C programming interview questionsadarshynl
 
Python Programming Language | Python Classes | Python Tutorial | Python Train...
Python Programming Language | Python Classes | Python Tutorial | Python Train...Python Programming Language | Python Classes | Python Tutorial | Python Train...
Python Programming Language | Python Classes | Python Tutorial | Python Train...Edureka!
 
CodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-Issue
CodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-IssueCodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-Issue
CodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-IssueDhaval Dalal
 
Full Python in 20 slides
Full Python in 20 slidesFull Python in 20 slides
Full Python in 20 slidesrfojdar
 
PYTHON NOTES
PYTHON NOTESPYTHON NOTES
PYTHON NOTESNi
 

Was ist angesagt? (20)

History of F#, and the ML family of languages.
History of F#, and the ML family of languages. History of F#, and the ML family of languages.
History of F#, and the ML family of languages.
 
Python Programming - I. Introduction
Python Programming - I. IntroductionPython Programming - I. Introduction
Python Programming - I. Introduction
 
Python for All
Python for All Python for All
Python for All
 
Python Introduction | JNTUA | R19 | UNIT 1
Python Introduction | JNTUA | R19 | UNIT 1 Python Introduction | JNTUA | R19 | UNIT 1
Python Introduction | JNTUA | R19 | UNIT 1
 
F# and functional programming
F# and functional programmingF# and functional programming
F# and functional programming
 
System Programming Unit IV
System Programming Unit IVSystem Programming Unit IV
System Programming Unit IV
 
Optimization of dfa
Optimization of dfaOptimization of dfa
Optimization of dfa
 
Presentation on python
Presentation on pythonPresentation on python
Presentation on python
 
Introduction to Python Programming
Introduction to Python ProgrammingIntroduction to Python Programming
Introduction to Python Programming
 
Python programming introduction
Python programming introductionPython programming introduction
Python programming introduction
 
C programming interview questions
C programming interview questionsC programming interview questions
C programming interview questions
 
Python basics
Python basicsPython basics
Python basics
 
Python basics
Python basicsPython basics
Python basics
 
Python Programming Language | Python Classes | Python Tutorial | Python Train...
Python Programming Language | Python Classes | Python Tutorial | Python Train...Python Programming Language | Python Classes | Python Tutorial | Python Train...
Python Programming Language | Python Classes | Python Tutorial | Python Train...
 
Python for Swift
Python for SwiftPython for Swift
Python for Swift
 
Knowledge Extraction
Knowledge ExtractionKnowledge Extraction
Knowledge Extraction
 
Introduction to F#
Introduction to F#Introduction to F#
Introduction to F#
 
CodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-Issue
CodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-IssueCodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-Issue
CodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-Issue
 
Full Python in 20 slides
Full Python in 20 slidesFull Python in 20 slides
Full Python in 20 slides
 
PYTHON NOTES
PYTHON NOTESPYTHON NOTES
PYTHON NOTES
 

Ähnlich wie F# and the DLR

Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010Satish Verma
 
F# for functional enthusiasts
F# for functional enthusiastsF# for functional enthusiasts
F# for functional enthusiastsJack Fox
 
Exploring SharePoint with F#
Exploring SharePoint with F#Exploring SharePoint with F#
Exploring SharePoint with F#Talbott Crowell
 
F# Ignite - DNAD2010
F# Ignite - DNAD2010F# Ignite - DNAD2010
F# Ignite - DNAD2010Rodrigo Vidal
 
Combinators, DSLs, HTML and F#
Combinators, DSLs, HTML and F#Combinators, DSLs, HTML and F#
Combinators, DSLs, HTML and F#Robert Pickering
 
Functional Programming
Functional ProgrammingFunctional Programming
Functional ProgrammingRyan Riley
 
Functional Programming in R
Functional Programming in RFunctional Programming in R
Functional Programming in RDavid Springate
 
Building scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftBuilding scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftTalentica Software
 
Building scalable and language-independent Java services using Apache Thrift ...
Building scalable and language-independent Java services using Apache Thrift ...Building scalable and language-independent Java services using Apache Thrift ...
Building scalable and language-independent Java services using Apache Thrift ...IndicThreads
 
Beyond PITS, Functional Principles for Software Architecture
Beyond PITS, Functional Principles for Software ArchitectureBeyond PITS, Functional Principles for Software Architecture
Beyond PITS, Functional Principles for Software ArchitectureJayaram Sankaranarayanan
 
[4DEV] Bartosz Sokół - Functional developer in object oriented world - how F#...
[4DEV] Bartosz Sokół - Functional developer in object oriented world - how F#...[4DEV] Bartosz Sokół - Functional developer in object oriented world - how F#...
[4DEV] Bartosz Sokół - Functional developer in object oriented world - how F#...PROIDEA
 
Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007Guillaume Laforge
 
TI1220 Lecture 14: Domain-Specific Languages
TI1220 Lecture 14: Domain-Specific LanguagesTI1220 Lecture 14: Domain-Specific Languages
TI1220 Lecture 14: Domain-Specific LanguagesEelco Visser
 
Functional programming with FSharp
Functional programming with FSharpFunctional programming with FSharp
Functional programming with FSharpDaniele Pozzobon
 
TechDaysNL 2015 - DDD with F#
TechDaysNL 2015 - DDD with F#TechDaysNL 2015 - DDD with F#
TechDaysNL 2015 - DDD with F#Ronald Harmsen
 

Ähnlich wie F# and the DLR (20)

F# 101
F# 101F# 101
F# 101
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
 
F# for functional enthusiasts
F# for functional enthusiastsF# for functional enthusiasts
F# for functional enthusiasts
 
Exploring SharePoint with F#
Exploring SharePoint with F#Exploring SharePoint with F#
Exploring SharePoint with F#
 
F# Tutorial @ QCon
F# Tutorial @ QConF# Tutorial @ QCon
F# Tutorial @ QCon
 
F# Ignite - DNAD2010
F# Ignite - DNAD2010F# Ignite - DNAD2010
F# Ignite - DNAD2010
 
Combinators, DSLs, HTML and F#
Combinators, DSLs, HTML and F#Combinators, DSLs, HTML and F#
Combinators, DSLs, HTML and F#
 
Functional Programming
Functional ProgrammingFunctional Programming
Functional Programming
 
Functional Programming in R
Functional Programming in RFunctional Programming in R
Functional Programming in R
 
F# for Trading
F# for TradingF# for Trading
F# for Trading
 
Building scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftBuilding scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thrift
 
Building scalable and language-independent Java services using Apache Thrift ...
Building scalable and language-independent Java services using Apache Thrift ...Building scalable and language-independent Java services using Apache Thrift ...
Building scalable and language-independent Java services using Apache Thrift ...
 
Beyond PITS, Functional Principles for Software Architecture
Beyond PITS, Functional Principles for Software ArchitectureBeyond PITS, Functional Principles for Software Architecture
Beyond PITS, Functional Principles for Software Architecture
 
[4DEV] Bartosz Sokół - Functional developer in object oriented world - how F#...
[4DEV] Bartosz Sokół - Functional developer in object oriented world - how F#...[4DEV] Bartosz Sokół - Functional developer in object oriented world - how F#...
[4DEV] Bartosz Sokół - Functional developer in object oriented world - how F#...
 
Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007
 
Practical F#
Practical F#Practical F#
Practical F#
 
TI1220 Lecture 14: Domain-Specific Languages
TI1220 Lecture 14: Domain-Specific LanguagesTI1220 Lecture 14: Domain-Specific Languages
TI1220 Lecture 14: Domain-Specific Languages
 
Functional programming with FSharp
Functional programming with FSharpFunctional programming with FSharp
Functional programming with FSharp
 
Dart programming language
Dart programming languageDart programming language
Dart programming language
 
TechDaysNL 2015 - DDD with F#
TechDaysNL 2015 - DDD with F#TechDaysNL 2015 - DDD with F#
TechDaysNL 2015 - DDD with F#
 

Mehr von Richard Minerich

How we use functional programming to find the bad guys @ Build Stuff LT and U...
How we use functional programming to find the bad guys @ Build Stuff LT and U...How we use functional programming to find the bad guys @ Build Stuff LT and U...
How we use functional programming to find the bad guys @ Build Stuff LT and U...Richard Minerich
 
GHCi: More Awesome Than You Thought
GHCi: More Awesome Than You ThoughtGHCi: More Awesome Than You Thought
GHCi: More Awesome Than You ThoughtRichard Minerich
 
Functional Ideas for a Cloudy Future
Functional Ideas for a Cloudy FutureFunctional Ideas for a Cloudy Future
Functional Ideas for a Cloudy FutureRichard Minerich
 
Getting the MVVM Kicked Out of Your F#'n Monads
Getting the MVVM Kicked Out of Your F#'n MonadsGetting the MVVM Kicked Out of Your F#'n Monads
Getting the MVVM Kicked Out of Your F#'n MonadsRichard Minerich
 
How you can get started with F# today
How you can get started with F# todayHow you can get started with F# today
How you can get started with F# todayRichard Minerich
 
F# in the Classroom and the Lab
F# in the Classroom and the LabF# in the Classroom and the Lab
F# in the Classroom and the LabRichard Minerich
 

Mehr von Richard Minerich (7)

How we use functional programming to find the bad guys @ Build Stuff LT and U...
How we use functional programming to find the bad guys @ Build Stuff LT and U...How we use functional programming to find the bad guys @ Build Stuff LT and U...
How we use functional programming to find the bad guys @ Build Stuff LT and U...
 
GHCi: More Awesome Than You Thought
GHCi: More Awesome Than You ThoughtGHCi: More Awesome Than You Thought
GHCi: More Awesome Than You Thought
 
Functional Ideas for a Cloudy Future
Functional Ideas for a Cloudy FutureFunctional Ideas for a Cloudy Future
Functional Ideas for a Cloudy Future
 
Fun and Games in F#
Fun and Games in F#Fun and Games in F#
Fun and Games in F#
 
Getting the MVVM Kicked Out of Your F#'n Monads
Getting the MVVM Kicked Out of Your F#'n MonadsGetting the MVVM Kicked Out of Your F#'n Monads
Getting the MVVM Kicked Out of Your F#'n Monads
 
How you can get started with F# today
How you can get started with F# todayHow you can get started with F# today
How you can get started with F# today
 
F# in the Classroom and the Lab
F# in the Classroom and the LabF# in the Classroom and the Lab
F# in the Classroom and the Lab
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 

Kürzlich hochgeladen (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

F# and the DLR

  • 1. F# AND THE DLR Richard Minerich Senior Researcher at Bayard Rock F# MVP of the Year RichardMinerich.com
  • 2. The tools we use have a profound (and devious!) influence on our thinking habits, and, therefore, on our thinking abilities. -- Edsger Dijkstra
  • 3.
  • 4. F# vs Dynamic F# Dynamic Languages Constructs conform to types and are fixed at runtime Types conform to constructs and change at runtime Data is immutable by default Generally data is mutable by default Protection from many kinds of mistakes No protection, even from typos Native interop with existing .NET Programs and Libraries Some work required for interop, but it’s not difficult Somewhat difficult to learn Very easy to learn
  • 5.
  • 6. If you love to code, you’ll love F#. Immutable Data Structures Tail Recursion Discriminated Unions Partial Application Function Composition Quotations Computation Expressions Statically Resolved Type Parameters
  • 7. If you hate to code, you’ll love F#
  • 8. Functional with Types? Functional + Types
  • 9.
  • 10. And has the tools to support it.
  • 11.
  • 12.
  • 13.
  • 14. Higher Order Functions Pass Functions into Functions Return Functions from Functions Functions and Values are Interchangeable > let findBestSort list = if List.length list < 1000 then insertionSort else quickSort;; val findBestSort : 'a list -> ('b list -> 'b list) when 'b : comparison Function Function Value Value Function Function Function Value is a
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21. Try writing some AI http://is.gd/SilverlightAnts
  • 22. Try F# at tryfsharp.org
  • 23.
  • 25.
  • 26.
  • 29. Metaobject Visualization Users and programs interact with metaobjects, not directly with their backing objects as in C#, VB.NET or F#. control create invoke
  • 32. DLR Books and Resources http://www.silverlight.net/learn/dynamic-languages/ http://is.gd/DLRFAQ
  • 33.

Hinweis der Redaktion

  1. C# is OO/Imperative, why is functional important?
  2. F# has a ton of new constructs to explore and will open your mind to completely new ways of doing things. Things you never thought possible before. You don’t need to understand of this stuff to enjoy F#, but it has a lot to explore if you’re into that kind of thing. Even if you don’t use F# professionally, just learning how these things work will make you a better programmer in general.
  3. If you care about getting things done quickly, and programming is just a means to an end F# can get you there quickly and safely.
  4. More, Better, Natively Concurrent Code in Less Time
  5. F# has a lot of great graphics frameworks. You can make beautiful graphics with very little code. FsChart (left), VSLab (middle top), Tomas’s F# Library for Learning Graphics (top right), Jon Harrop F# for Visualization (bottom right) Tomas’s Graphics Lib: https://github.com/tpetricek/Documents/tree/master/Talks%202011/Teaching%20F%23%20(Community%20for%20F%23)
  6. It fits together like puzzle pieces.
  7. You can perform any type of iteration with a recursive function. F# optimizes a special type of recursive functions into loops using a method called tail call optimization. Tail call optimization
  8. Lambda expressions are great because they reduce our need to make imperative style variable assignments. Small functions can just be included inline.
  9. Commonly used with higher order functions and lambda expressions
  10. Sticker question Answer: “Less than ten” Match on types, contents of types, strings, lists…. Very flexible
  11. This is used to avoid the problem of nulls New values not in a match will cause warnings (or even failure if the compiler is told to do so) They can even be recursive and be used to build strongly typed tree structures
  12. I wrote an ant colony AI simulation in Silverlight with uploadable AI. Give it a go when you get some time.
  13. You only need parse and lex your way to an expression tree. The DLR takes care of everything from there.
  14. Slide care of Kevin Hazzard
  15. You can write your whole Silverlight application without a single line of compiled code