A constant class can have its properties changed. A constant struct can't. This sounds inconsistent until you remember the signpost — and then it makes perfect sense.
There's a moment when you're learning Swift where something happens that makes absolutely no sense on the surface. You create a constant class instance — a let — and then you change one of its properties. And it works. Swift lets you do it without complaint.
Meanwhile, you try the same thing with a constant struct and Swift immediately shuts you down.
Same keyword. Different behavior. What's going on?
The answer, as with most things in the classes chapter, comes back to the signpost. 🍥






