Download - The Next Generation for C# Developers
仕事
個人活動
http://tanaka733.net
https://www.nuget.org/profiles/tanaka_733/
先生
.NET の行く先は?
C# の新機能は?
これから何ができるの?
※意外とde:codeで話が少なかったんですよ!!!1
.NET vNext
Core .NET
Next gen JIT (“RyuJIT”)
SIMD
Runtime Compilers
.NET Compiler Platform (“Roslyn”)
Languages innovation
Windows DesktopAzure and Windows Server
Universal projects
.NET NativeASP.NET updates
Windows Convergence
Native compilation Cross-devices
Xamarin partnership
Web apps
.NET support for
Azure Mobile Services
Cloud Services
Openness
Windows Store iOS and Android
.NET in devices and services
The Future of C# (Channel 9)
Core .NET
Next gen JIT (“RyuJIT”)
SIMD
Runtime Compilers
.NET Compiler Platform (“Roslyn”)
Languages innovation
Windows DesktopAzure and Windows Server
Universal projects
.NET NativeASP.NET updates
Windows Convergence
Native compilation Cross-devices
Xamarin partnership
Web apps
.NET support for
Azure Mobile Services
Cloud Services
Openness
Windows Store iOS and Android
.NET in devices and services
The Future of C# (Channel 9)
RyuJIT Roslyn
ASP.NET vNext
.NET Native
Mobile First
Cloud First
Roslyn and C# 6.0(仮)新しいコンパイラ、新しい言語仕様
C# とVBのコンパイラの再構築
Openness (ブラックからホワイトへ)
豊富なAPIが公開されている
Quality Improvements
API Readiness
Language Features
Diagnostics
Interactive
IDE Support Roslyn Roadmap
IDEが止まらない
• 並列性を高めるためのPDB
• OSSテストキット
WinRTで使いやすく
XMLコメント
妥当な引数チェック
集合型の合理性
コード解析
• 解析ツール
• 静的解析用
• フロー解析を拡張
パフォーマンス改善
コンフリクト検出の改善
Language feature implementation status
public class Point(int x, int y){
public int X { get; } = x;public int Y { get; } = y;
public double R { get; } = Math.Sqrt(x^x+y^y);
public Point() : this(0, 0){ }
public override string ToString(){
return string.Format("({0},{1},{2})", X, Y, R);}
}
using System.Console;
static class UsingStaticMembers{
static void Dump(){
WriteLine("Hoge");}
}
static class DictionaryInitializer{
public static IDictionary<string, string> Demo(){
return new Dictionary<string, string>(){
["x"] = "hoge",$key = "hoge"
};}
}
if (int.TryParse(text, out var i)){
Console.WriteLine("指定された値は数値に変換できて、{0} です。", i);}else{
Console.WriteLine("指定された値は数値に変換できません。");}
static async Task Demo(){
//Await in catch/finally//Exception filterstry{
var urls = new[] { "http://microsoft.com", "http://bing.com" };var client = new HttpClient();var tasks = urls.Select(url => client.GetAsync(url));var res = await Task.WhenAll(tasks);
}catch (AggregateException e) if (e.InnerExceptions.Count > 2){
await Report("Error");}finally{
await Report("End");}
RyuJIT
64bitでも高速なJITコンパイルをJITの出力結果は64bitで高速に動くが、JIT自体が64bitで遅かった
サーバー側で動く想定で、JITコンパイルは遅くてもいいという想定
でも最近のWebアプリは立ち上がりからもっと早くなってほしい
RyuJIT: The next-generation JIT compiler for .NET
static void Demo(){
// Array of 2 * Vector<int>.Length valuesint[] values = CreateValues();
// Multiply the first N values with the second// N values (N, being Vector<int>.Length).var x = new Vector<int>(values, 0);var y = new Vector<int>(values, Vector<int>.Length);var z = x * y;
// Store the result in the array where x came fromz.CopyTo(values, 0);
}
.NET NativeC#にNative なみの速さを
C++ 並の速度をC#に!C# のdynamic compilation の自由度を持ったまま、C++のstatic compilation のように実行時コンパイルをなくして、実行速度を高速化したい
Runtime Directive
最初のターゲットはx64 or ARM なWindows Store App
.NET Team の .NET Native タグがついたブログ
http://aka.ms/dotnetnative
My experience with .NET Native Preview
ASP.NET vNext
MVC, Web API, Web Pages の統一WebFormsも改善されます
System.Webからの脱却
Cloud最適化モード同一サーバー上に複数のアプリが独立して動かせる (GAC非依存)
セッションやキャッシュのAPIもCloudとオンプレ問わず使えるDIによる切り替え
ブラウザで更新するだけで最新のコードが反映Roslynによるビルド
(従来の).NET Framework とCloud最適化モードはプロジェクトの設定で切り替え可能
閑話休題:その他の話題時間調整かもしれない
まとめ
Core .NET
Next gen JIT (“RyuJIT”)
SIMD
Runtime Compilers
.NET Compiler Platform (“Roslyn”)
Languages innovation
Windows DesktopAzure and Windows Server
Universal projects
.NET NativeASP.NET updates
Windows Convergence
Native compilation Cross-devices
Xamarin partnership
Web apps
.NET support for
Azure Mobile Services
Cloud Services
Openness
Windows Store iOS and Android
.NET in devices and services
The Future of C# (Channel 9)