ufcpp-live / UfcppLiveAgenda

@ufcpp live streaming agenda
MIT License
24 stars 2 forks source link

Visual Studio 17.6 Preview 2 #69

Closed ufcpp closed 1 year ago

ufcpp commented 1 year ago

配信URL: https://youtube.com/live/9yXRPyDP3g8

告知ブログ・リリースノートにはどこにも書かれてないものの、 C# 12 のプライマリコンストラクターの実装あり。

Breakpoint Groups とかちょっと気になる

function pointer の情報、Refection で取れるようになったって。 前は戻り値とか引数とかの型情報取れなかった。

以前 との差分、

起動直後から Visual Studio 本体 IDE が起動するように。 昔そうだったから、元に戻った。 昔、Welcome 専用ウィンドウを起動してたの、起動時間短縮のためのはずなんだけど。 本体 IDE が軽くなった?

長くてあんまり読む気にはなれず…

ufcpp-live commented 1 year ago

来年どうなっているのかな?

image

ufcpp-live commented 1 year ago

絵文字にはいつ色付くの?

image

ufcpp-live commented 1 year ago
[JsonSerializable(typeof(A))]
partial class C : JsonSerializerContext;

// ここにメンバーを書くような、file-scoped types の望みは絶たれた。

interface IA;
interface IB;
interface IC;

interface IAll : IA, IB, IC;
ufcpp-live commented 1 year ago
class Base(int x) { }

class A(int x) : Base(x)
{
    public int X { get; } = x; // これ、 base(x) 呼びよりも前になる
}

class B : Base
{
    public int X { get; }

    public B(int x) : base(x)
    {
        X = x;
    }
}
ufcpp-live commented 1 year ago

image

ufcpp-live commented 1 year ago
// DI
partial class B(ILogger<B> logger)
{
    // フィールド用意したにも関わらず
    private readonly ILogger<B> _logger = logger;

    public void M()
    {
        // おっと、 _ 忘れた…
        logger.LogTrace("aaaa");

        // 引数、mutable
        logger = null; // しかも、フィールド書き換えになるので、クラス全域に影響

        // this.logger 不可
        this.logger.LogInformation("aaa");
    }
}
ufcpp-live commented 1 year ago
partial class B(ILogger<B> logger)
{
    // イニシャライザーに限定するにしても…
    private readonly ILogger<B> _logger = logger;

    // イニシャライザーだけでもキャプチャ発生
    private readonly Func<object> F = () => logger;

    public void M()
    {
        logger = null;
    }
}
ufcpp-live commented 1 year ago

後でバグ報告案件:

ref struct S(ref int x)
{
    public ref int Ref = ref x;
}

ref struct S1
{
    public ref int Ref;

    public S1(ref int x)
    {
        Ref = ref x;
    }
}
ufcpp-live commented 1 year ago
// 結局 UpperCamel 使うかもしれぬ…
partial class B(ILogger<B> Logger)
{
    public void M()
    {
        Logger.LogInformation("");
    }
}
aetos382 commented 1 year ago

来年どうなっているのかな?

image

ETW (EventSource) 関連っぽい(勘)