2 Matching Annotations
  1. Jan 2014
    1. Once you abandon entirely the crazy idea that the type of a value has anything whatsoever to do with the storage, it becomes much easier to reason about it. Of course, my point above stands: you don't need to reason about it unless you are writing unsafe code or doing some sort of heavy interoperating with unmanaged code. Let the compiler and the runtime manage the lifetime of your storage locations; that's what its good at.

      Understanding what you should (and should not) reason about in the language you are using is an important part of good programming; and a language that lets you reason (nee worry) about only the things you need to worry about is an important part of a good programming language.

    1. Surely the most relevant fact about value types is not the implementation detail of how they are allocated, but rather the by-design semantic meaning of “value type”, namely that they are always copied “by value”.