I am modelling sensor readings and device settings in Swift. When I made Settings a class, changing it in one screen changed it everywhere, which caused a bug. When I made it a struct, a function that was supposed to update the settings had no effect on the caller's copy, and the compiler complained about mutating a let constant.
What exactly differs between the two, and how do I choose for small data types like these?




