Put differently, you want to prevent transformation of references, but using a completely ineffective tool to achieve it. Making references read-only doesn't prevent transformation.
Preventing transformation (stringification, numification, but not booleanification) of references might be a good idea.
Issues:
- Intentional uses of $ref+0 would have to be replaced by refaddr($ref).
- Intentional uses of "$ref" would have to be replaced.
- Programs that mostly function will start dying instead.
Benefits:
- Catch some bad code (But what code wouldn't already be obviously wrong?)