tomjaguarpaw:
Do you mean I shouldn’t use
IOScopedRef(if it existed) to get the behaviour I desire
Not exactly, my point is that tacking dynamic allocations onto this feature is at best unnecessary and at worst would pollute the language with a second way to do something it already excels at.
A static reference table is the “missing” thing in the language as I see it.
tomjaguarpaw:
With “references”, the libraries providing
LoggerandwriteUserDataneed not know anything about the existence of “references”. Only the caller need use them.
I don’t think this has anything to do with whether the references are static or dynamic, you can wrap the library either way.