Remove the wall-clock and monotonic-clock pseudo-handle types, and change now() and similar functions to be callable without any arguments.
For users that don't need multiple wall clocks or multiple monotonic clocks, this significantly simplifies the API.
For users that do need multiple wall clocks or multiple monotonic clocks at runtime, the component model could be extended to allow instances to be used as resources, which would allow any link-time authority API to be used through a handle. This seems like a better overall approach for WASI, as it means that many APIs won't need to decide between using handles for theoretical flexibility or using link-time authority for immediate usability. We can just use link-time authority when the immediate use cases want it, and use instance handles when the need arises to use them dynamically.
Remove the
wall-clock
andmonotonic-clock
pseudo-handle types, and changenow()
and similar functions to be callable without any arguments.For users that don't need multiple wall clocks or multiple monotonic clocks, this significantly simplifies the API.
For users that do need multiple wall clocks or multiple monotonic clocks at runtime, the component model could be extended to allow instances to be used as resources, which would allow any link-time authority API to be used through a handle. This seems like a better overall approach for WASI, as it means that many APIs won't need to decide between using handles for theoretical flexibility or using link-time authority for immediate usability. We can just use link-time authority when the immediate use cases want it, and use instance handles when the need arises to use them dynamically.