Is this a good use case for a class instead of a struct?

Dot notation just accesses a property/method on the specific object you use it on. Whether that modification edits another object somewhere else is depended on if that object is a class or struct, and where it came from. I.e. all in same scope, or passed in as a param of a method etc.

Correct, because they are two separte objects since it was a struct it got passed by copy, not reference. If it were a class, then it would have been passed by reference and would have been the same object.

Read through Carcin a few times. Iā€™m hoping itā€™ll make things more clear on whatā€™s going on for you.

Again i canā€™t stress it enough that dot notation just edits a specific object, what the side effects are from doing that stem from whether the object as a struct or a class. As demonstrated in the playground link.

That is more like linter job and not a compiler :thinking:

It requires a semantic phase run to know whether the variable is of a value type or a reference type.

I think that lints works only at a syntax level.