News for hackers. Stuff that matters.
Re:Problems with Kotlin by steveklabnik on Thursday March 16, 2017 @09:54AM (#13884980)
Yes, there's an optimization. Specifically, there's a trait called "NonZero"; if T implements it, then Option<T> uses all zeros to represent None, and so std::mem::size_of::<Option<T>>() == std::mem::size_of::<T>(); If not, then you have to store a tag.

There are no comments on this comment yet.