Open deech opened 8 years ago
Maybe instead of everything being a file path, everything is a URL.
(open "path/to/file.txt" in)
- opens a file stream, or a network stream on a relative path in the browser
(open "http://domain.com/index.html" in)
- opens a network stream
I don't know how this would work in the browser with an asynchronous API or for HTTP POSTs where you have to write a payload and then read a response.
Currently the standard restricts the meaning of streams to file streams. The underlying idea is a Plan 9-like design aesthetic in which everything is a file. This should be extended to any kind of streaming data, the interpretation of which is at the discretion of the port author.
This requirement by the standard is restrictive when dealing with environments, like JS, that don't have a concept of files.