Comment

Comment by momocowcow

casey muratori would like to have a talk with you about the following :))

    // Approximately what the JIT generates
    if (animal?.GetType() == typeof(Dog))
    {
        ((Dog)animal).Speak();  // devirtualized, inlinable
    }
    else
    {
        animal.Speak(); // original virtual call, hopefully rare
    }
parent momocowcow 1 month ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton