Mirror of
forum.nim-lang.org
index
10630 :: Should closing a stream assign nil?
[2023-11-13T21:04:11+01:00]
View Orginal
mszs
(orginal)
[2023-11-13T21:04:11+01:00]
view original
I was kind of expecting
close
to assign
nil
to the stream being closed. What is the rationale for not doing this?
Araq
(orginal)
[2023-11-13T21:14:47+01:00]
view original
The rationale for not doing it is that it doesn't help as you can have many variables pointing to the same stream which would not be
nil
'ed out.