Such a protocol would make sense only if new specific syntax was added to
the language. But is that really necessary when this can be implemented
very easily without new syntax?
```js
async function open(file, opts, func) {
const fd = await fsp.open(file, opts);
await func(fd);
await fsp.close(fd);
}
await open("/path/to/file", {mode: "r+"}, async function (fd) {
const bit = await fsp.read(fd);
});
```
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss