3 ms·
Is a value type different from a value class? https://github.com/google/auto/blob/master/value/userguide/index.md https://github.com/google/auto/blob/master/va
by gliop 7y ago
Is a value type different from a value class?
https://github.com/google/auto/blob/master/value/userguide/index.md https://github.com/google/auto/blob/master/value/userguide/i...
- dbaupp 7y agoYes, those value classes are still heap/GC allocated objects. Value types are a generalisation of `int`, `long`, `float` (etc), where values are stored inline, not allocated on the heap. For instance, a `Pair<long, double>` that isn't a pointer, but is instead the exactly the size of a long plus a double, and is the same as writing `long first; double second;` inline.