News for hackers. Stuff that matters.
Re:Should I use a Swift struct or a class? by tel on Saturday July 04, 2015 @04:30PM (#9831504)
It comes down to equality. Values have "extensional equality" which means that values A and B are equal exactly and only when they look the same and can be used in the same way. On the other hand, most people are used to "referential equality" which is more strict. It lets me distinguish "your copy" of A from "my copy" of A via their names.

Without referential equality things like mutation fail to have any sense, but programs are in general simpler.

Re:Should I use a Swift struct or a class? by holyjaw on Sunday July 05, 2015 @01:53AM (#9832623)
Cool, thanks for the distinction! Gives me some terms to look up for more info, too.