ufcpp-live / UfcppLiveAgenda

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

.NET 9 Preview 2 #88

Closed ufcpp closed 4 months ago

ufcpp commented 6 months ago

配信URL: https://www.youtube.com/watch?v=Bzvlkj8-Ms8

core 9217 差分がわかりにくいと怒られ中。 API Diff: core 9220

まあでもそんなに差分なく。 https://github.com/ufcpp-live/UfcppLiveAgenda/issues/85 の続きやると思う。

https://twitter.com/ufcpp/status/1767785556992487600 インターセプターの相対パス対応は入ってた。

ufcpp-live commented 6 months ago

「左から順に」の保証のためにすごい量の stloc, ldloc が入る。

image

ufcpp-live commented 6 months ago
// これも可能性として将来できるようになるかもしれない。
Action<ref int> a = ref x => { };
ufcpp-live commented 6 months ago
A<in int> a; // この in は ref readonly の in。

delegate void A<in T>(T x); // この in は反変の in。
ufcpp-live commented 6 months ago
M(new { Name = "" }, (ref var x) => { }); // 匿名型 ref 引数書く手段今までなかった。
M(new { Name = "" }, (ref x) => { }); // 今後こう書けるはず。

static void M<T>(T x, RefAction<T> a) { }

delegate void RefAction<T>(ref T arg);
ufcpp-live commented 6 months ago
using System.Collections;

MyLongLongNameClaaaaaaaaaaaas x = new();

// ここに MyLongLongNameClaaaaaaaaaaaas 書きたくなああああああああああい。
M<int, MyLongLongNameClaaaaaaaaaaaas>(x);
M<string, MyLongLongNameClaaaaaaaaaaaas>(x);

// こう書かせて。
M<int, _>(x);
M<string, _>(x);

static void M<T, TE>(TE x)
    where TE : IEnumerable<T>
{
}

class MyLongLongNameClaaaaaaaaaaaas
    : IEnumerable<int>,
    IEnumerable<string>
{
    public IEnumerator<int> GetEnumerator()
    {
        throw new NotImplementedException();
    }

    IEnumerator IEnumerable.GetEnumerator()
    {
        throw new NotImplementedException();
    }
}