F# 3.0 Quick Preview

2,902 views

Published on

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,902
On SlideShare
0
From Embeds
0
Number of Embeds
41
Actions
Shares
0
Downloads
21
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

F# 3.0 Quick Preview

  1. 1. 昨日の今日でF#3.0<br />@igeta<br />
  2. 2. Visual Studio 11 Developer Preview<br />//build/ カンファレンス<br />9.13-9.16, 2011<br />Anaheim, California<br />
  3. 3. Preview release of F# 3.0as part of the VS 11<br />Microsoft® Visual Studio® 11 Developer Preview (Web Installer)<br />http://www.microsoft.com/download/en/details.aspx?id=27543<br />Microsoft® Visual Studio® 11 Developer Preview (ISO)<br />http://www.microsoft.com/download/en/details.aspx?id=27538<br />今朝、一般公開されました!<br />
  4. 4. Preview release of F# 3.0as part of the VS 11<br />Microsoft® Visual Studio® 11 Developer Preview (Web Installer)<br />http://www.microsoft.com/download/en/details.aspx?id=27543<br />Microsoft® Visual Studio® 11 Developer Preview (ISO)<br />http://www.microsoft.com/download/en/details.aspx?id=27538<br />今朝、一般公開されました!<br />
  5. 5. Don Symeのセッション<br />F# 3.0: data, services, Web, cloud, at your fingertips<br />Date: September 16, 2011 from 10:30AM to 11:30AM<br />Speakers: Don Syme<br />http://channel9.msdn.com/Events/BUILD/BUILD2011/SAC-904T<br />“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.”<br />
  6. 6. Don Symeのセッション<br />F# 3.0: data, services, Web, cloud, at your fingertips<br />Date: September 16, 2011 from 10:30AM to 11:30AM<br />Speakers: Don Syme<br />http://channel9.msdn.com/Events/BUILD/BUILD2011/SAC-904T<br />“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.”<br />
  7. 7. F# 3.0でどうなる?<br />Don Syme 曰く、<br />(F# 3.0 は)プログラミング エクスペリエンスの中にデータとサービスを統合します、新しくてパワフルな方法で。<br />
  8. 8. データとサービスとは何を指す?<br />SharePoint<br />Azure Data Market<br />OData<br />Entity Framework<br />SQL Server<br />
  9. 9. データとサービスを統合するための F# 3.0 の注目の新機能<br />型プロバイダー(Type Provider)<br />クエリ式(Query Expression)<br />
  10. 10. いつ型プロバイダー/クエリ式か?<br />型プロバイダー -> クエリ式 -> リスト処理<br />
  11. 11. いつ型プロバイダー/クエリ式か?<br />シーケンス<br />型プロバイダー -> クエリ式 -> リスト処理<br />
  12. 12. F#におけるリストシーケンス処理<br />seq { 0..9 }<br />|> Seq.filter (fun n -> n%2 = 0)<br />// seq [0; 2; 4; 6; 8]<br />|> Seq.map (( * ) 2)<br />// seq [0; 4; 8; 12; 16]<br />|> Seq.sum<br />// 40<br />|> printfn "%d"<br />
  13. 13. F#におけるリストシーケンス処理<br />seq { 0..9 }<br />|> Seq.filter (fun n -> n%2 = 0)<br />// seq [0; 2; 4; 6; 8]<br />|> Seq.map (( * ) 2)<br />// seq [0; 4; 8; 12; 16]<br />|> Seq.sum<br />// 40<br />|> printfn "%d"<br />
  14. 14. F#におけるリストシーケンス処理<br />F#のオブジェクト・・・<br />以外のものも扱いたい!<br />seq { 0..9 }<br />|> Seq.filter (fun n -> n%2 = 0)<br />// seq [0; 2; 4; 6; 8]<br />|> Seq.map (( * ) 2)<br />// seq [0; 4; 8; 12; 16]<br />|> Seq.sum<br />// 40<br />|> printfn "%d"<br />
  15. 15. それぞれの役割<br />型プロバイダー:既知の構造の外部リソース(データ/サービス)に適切な型を付けてくれる型<br />クエリ式:外部リソース読み込み時に、まるっと全データ読むんじゃなく、必要部分のみ読んでくる、みたいなことが可能<br />シーケンス処理:必要十分に軽くなったデータを受け取って、煮るなり焼くなり好きにする<br />
  16. 16. > DEMO;;<br />Piet Amersfoort氏のブログより<br />http://ps-a.blogspot.com/2011/09/f-type-providers-odata-from-nuget.html<br />
  17. 17. Null許容型サポート<br />
  18. 18. 自動実装プロパティ(Automatically implemented properties)<br />type MyClass() =<br />// 可変な変数をラップするだけのプロパティ<br />let mutable prop = ""<br /> member this.Prop<br /> with get() = prop<br /> and set(v) = prop <- v<br />// 自動実装プロパティ<br /> member val AutoProp = "" with get, set<br />
  19. 19. おしまい<br />ご清聴ありがとうございました。<br />

×