3 ms·
yeah as said, normally people would see records/data classes as classes that don't use the same amount of memory than a normal class. i.e. some kind of immutabl
by merb 7y ago
yeah as said, normally people would see records/data classes as classes that don't use the same amount of memory than a normal class. i.e. some kind of immutable struct. that's why I'm a little bit salty about the feature.
currently records are more comparable to the scala case classes, where you have automatic destructors, better equality, immutability, etc... and not necessary a compacter memory data.
reading the proposal makes more sense than this deep dive, since it explains the reasoning why they don't added special cased data classes.