-
-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
This is a topic which is heavily misunderstood. Even from the concept that a record is immutable (yes this is true, but it is not deeply immutable so it causes some confusion).
I think focusing some effort into writing something about this could have some great benefits for newcomers.
They do things like
String foo = "foo";
foo.toUpperCase(); // new string
or
List.of()
or
public record Student(String name, List<String> courses) { }
// Cant modify the fields like student.name = "something";
// but can add to courses, this leads to confusion for newcomers
Metadata
Metadata
Assignees
Labels
No labels