-
Notifications
You must be signed in to change notification settings - Fork 16
Description
As it stands, the current SAW lesson utilizes the read_only parameter for symbolic pointers at various points. However, it never explains why it does so, so it seems superfluous at first brush.
I think it would be worth mentioning - perhaps in the section about lemmas - that read_only is useful when applying overrides in a loop because it provides a guarantee that a pointer passed into a function being overridden won't change between loop iterations.
Otherwise, SAW has a tendency to spit out some pretty nasty-looking errors that take a while to decipher, especially since they don't appear when an override is used just once.
There might also be other reasons to mark pointers as read_only beyond that error and good coding style, but I'm not aware of them.