Rename `@@dipose` and `@@asyncDispose`

I don't know if this ever deserves a new topic, but FWIW I suggest renaming the @@dipose and @@asyncDispose well-known symbols in the Sync and Async Explicit Resource Management proposals to @@disposer and @@asyncDisposer to match the part of speech of @@iterator and @@asyncIterator, both of which the for (using x of y) and for await (await using x of y) statements will use.

That is all. Tell me if I had missed something.

"Symbol.iterator" is a function which gives you an iterator. "Symbol.dispose" is a function which actually does the disposing, rather than giving you a disposer. Since they're different kinds of things, having their names be different parts of speech is appropriate.

The sync one's already stage 3, so it's unlikely to change, and https://github.com/tc39/proposal-explicit-resource-management would be the proper venue to file such an issue.

Yup, but I just write here first anyway since I don’t know if it is really worth a issue.
My perception is that stage 3 things still change vastly from time to time. Maybe that’s mostly due to web compatibility issues or serious feedbacks from implementers after browsers start shipping proposals though.

1 Like