Open Smaug123 opened 5 days ago
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
The docs for
Stream.Length
currently say:This is ambiguous, in the sense that I felt the need to spin up
dotnet fsi
to confirm to myself that I had picked the correct interpretation. Does it mean "the remaining length", or "the absolute length"? Of course it means "absolute", and most people will probably choose that interpretation anyway, but in a scenario where theStream
represents "forgetting everything that came before", it may be natural to interpret it as "remaining" (because theStream
has forgotten its past!).I don't have a great suggestion for an improvement, but perhaps a remark to the effect that "in a stream which supports
Seek
, this is expected essentially to be the value ofPosition
afterSeek(0L, SeekOrigin.End)
"? (Position
is much more natually an absolute concept, because you canSeek
backwards.) Or perhaps "When overridden… gets the total length in bytes of the stream"?