Comment

Comment by kibwen

You can do the following, which violates strict parametricity:

    fn foo<T>() -> usize {
        std::mem::size_of::<T>()
    }

    foo::<u8>(); // 1
    foo::<u16>();  // 2
parent kibwen 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton