BT

InfoQ Homepage News F# Type Providers – Why And How

F# Type Providers – Why And How

Bookmarks

Microsoft Research has published a white paper explaining how Type Providers makes F# useful for accessing and processing “internet scale” information sources.

What problems are Type Providers intended to solve?

  • Non-uniform schematization of data in various sources across the internet
  • Need to have a parsing layer (either auto-generated or manually written) for accessing each of these sources in a target language

Type Providers provide a standard mechanism to wrap an existing type of data source such that the data and matadata is available to the F# programmer – there is no need to create a separate wrapper for different data sources and schemas for that type once a provider is created. The data structure is inferred by the type provider by connecting to the data source at design time (assuming connectivity to the source).

This data can also be accessed by the the F# compiler and allows various IDE features such as intellisense and in-line documentation, with schema and metadata pulled from the data-source on demand.

Combined with LINQ, this makes F# extremely useful in manipulating data directly from various sources. You can have a look at this presentation by Joe Pamer for more details.

F# 3.0 was released along with .NET framework 4.5. Microsoft recently announced a Code-drop for it - you can now see how this feature is implemented under-the-hood.  

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.