Comment

Comment by Joker_vD

C# got Tuple only in version 7.0 which was released in 2017, if you don't know; while TryParse has been there since 1.0 in 2002. And I'd still prefer to have e.g.

    if ([double val, bool ok] = double.TryParse("5.x5"); ok) {
        Console.WriteLine(val);
    } else {
        Console.WriteLine("err");
    }
Of course, having "var" there would be even nicer.
parent Joker_vD 20 days ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton