2 ms·
I’d be fine with semantics similar to readonly fields (and incidentally, “const” in JavaScript): you can’t reassign the variable, but the contained object can d
by codeflo 4y ago
I’d be fine with semantics similar to readonly fields (and incidentally, “const” in JavaScript): you can’t reassign the variable, but the contained object can do what it wants.
To your last question: Yes, records are really nice syntactic sugar for classes that want to behave like values.