Upload
microsoft
View
383
Download
3
Embed Size (px)
DESCRIPTION
Modern programming thrives on rich spaces of data, information and services. With F# 3.0 and Visual Studio 11, you now have a tool that massively simplifies information-rich analytical programming. F# 3.0 provides integrated support for F# Information Rich Programming, a new and powerful way of integrating data and services into your programming experience. In this talk, we will describe the new features of F# 3.0, including the first released version of F# Type Providers and F# Queries, with apps to leverage technologies such as SharePoint, Azure Data Market, OData, Entity Framework and SQL Server.
Citation preview
palais des
congrès
Paris
7, 8 et 9
février 2012
7 Feb 2012Don SymePrincipal Researcher, Microsoft
F# 3.0 Information-Rich
ProgrammingData, Services, Web, Cloud, at your fingertips!
Now in Visual Studio 11 Developer Preview!
1 2 3 4 5 6 7
This is a Big Problem
magic
type providers
WebSharper/Pit/
Javascript (HTML5)
productive supported interoperable fun
ctional language
simple code complex problems
let swap (x, y) = (y, x)
let rotations (x, y, z) =
[ (x, y, z);
(z, x, y);
(y, z, x) ]
let reduce f (x, y, z) =
f x + f y + f z
C#
Tuple<U,T> Swap<T,U>(Tuple<T,U> t)
{
return new Tuple<U,T>(t.Item2, t.Item1)
}
ReadOnlyCollection<Tuple<T,T,T>> Rotations<T>(Tuple<T,T,T> t)
{
new ReadOnlyCollection<int>
(new Tuple<T,T,T>[]
{new Tuple<T,T,T>(t.Item1,t.Item2,t.Item3);
new Tuple<T,T,T>(t.Item3,t.Item1,t.Item2);
new Tuple<T,T,T>(t.Item2,t.Item3,t.Item1); });
}
int Reduce<T>(Func<T,int> f,Tuple<T,T,T> t)
{
return f(t.Item1)+f(t.Item2)+f(t.Item3);
}
F#
excels analytical engines
an application to balance the national power generation schedule
the calculation engine was written in F#
address the complexity at the heart of this application
algorithmic analysis of large data sets
F# + World Bank
F# + OData
F# + Climate Data + Weather Data
Language Integrated Web Data
into
Type Providers + LINQ
Language Integrated Data and Services
SQL
type "Server='.\\SQLEXPRESS'.."
let
OData
type "http://odata.netflix.com"
let
Web Services
type "http://www.xignite.com/xFutures.asmx?WSDL"
let
let avatarTitles = query { for t in netflix.Titles do
where (t.Name.Contains "Avatar") select t }
let avatarTitles = query { for t in netflix.Titles do
where (t.Name.Contains "Avatar")sortBy t.Nameselect t }
let avatarTitles = query { for t in netflix.Titles do
where (t.Name.Contains "Avatar")sortBy t.Nameselect ttake 100 }
Building a web site using ODataService<…>
without explicitcodegen
strongly typed
extensible, open
http://fsharp.nethttp://tryfsharp.org