3 ms·
What if you actually wanted to replace the entire document contents with a new document? Why should that be an error? The fact that the meaning of the API is c
by shawnz 7y ago
What if you actually wanted to replace the entire document contents with a new document? Why should that be an error?
The fact that the meaning of the API is commonly misunderstood is not (necessarily) a fault of the API
- leetrout 7y agoSure, something like a .clear or similar but the default behavior of clearing a loaded document by calling open on it is strange compared to what you would expect to happen with “normal” files/streams. Edit to add: I think calling write on a loaded document should have been an exceptional case and you should have had to explicitly call something to unload, replace or clear it.