Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
F Sharp (programming language)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Information-rich programming=== F# 3.0 introduced a form of compile-time meta-programming through statically extensible type generation called F# type providers.<ref name="typeproviders">{{cite web |url=http://msdn.microsoft.com/en-us/library/hh156509.aspx |title=Type Providers |access-date=2012-11-24}}</ref> F# type providers allow the F# compiler and tools to be extended with components that provide type information to the compiler on-demand at compile time. F# type providers have been used to give strongly typed access to connected information sources in a scalable way, including to the [[Freebase (database)|Freebase]] knowledge graph.<ref>{{cite web |url=http://blogs.msdn.com/b/dsyme/archive/2012/09/21/new-tech-report-from-microsoft-research-strongly-typed-language-support-for-internet-scale-information-sources.aspx |title=New Tech Report from Microsoft Research: Strongly-Typed Language Support for Internet-Scale Information Sources |access-date=2012-11-24}}</ref> In F# 3.0 the F# quotation and computation expression features are combined to implement [[LINQ]] queries.<ref name="queries">{{cite web |url=http://msdn.microsoft.com/en-us/library/vstudio/hh225374.aspx |title=Query Expressions (F#) |access-date=2012-11-24}}</ref> For example: <syntaxhighlight lang="fsharp"> // Use the OData type provider to create types that can be used to access the Northwind database. open Microsoft.FSharp.Data.TypeProviders type Northwind = ODataService<"http://services.odata.org/Northwind/Northwind.svc"> let db = Northwind.GetDataContext() // A query expression. let query1 = query { for customer in db.Customers do select customer } </syntaxhighlight> The combination of type providers, queries and strongly typed functional programming is known as ''information rich programming''.<ref name="irp">{{cite web |url=http://www.infoq.com/news/2011/09/Fsharp-3.0 |title=F# 3.0 β LINQ + Type Providers= Information Rich Programming |access-date=2012-11-24}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)