Skip to content

SAW: Stress importance of read_only for pointers #222

@ddfreeman

Description

@ddfreeman

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions