Some managed types are not always initialized.
True, but not for Setlength() on Dynamic arrays. Which was the question.
Otherwise the docs and the tests are both wrong.(all tests pass)
The original question
Suppose the following declaration:
...
Does an uninitialized dynamic array always have a length of zero, or is this an implementation detail?
1) Does not specify it is a local var, this could be a global, it could even be a field "private var" is possible). However, if indeed declared with "var" then it is not "result".
2) "an uninitialized" => is somewhat badly worded. Those aren't uninitialized. But for the actual point of the question: Yes those always start with length = zero. (afaik).
So then yes: "result" was not part of the question, but imho should be rightly mentioned as being different, since otherwise you can bet safely that someone will assume it to be part of the answer. And it is not.
Btw, I don't know about "out" param. Maybe, maybe not. No idea.