First I'll say I just started learning nim and used it for part of a small 
project and it was a joy to program in, a lot shorter and simpler to do the 
same tasks as it would be in c or c++ and still compiles to small and fast 
native code. My program was opening a lot of network connections, and I read in 
<https://nim-lang.org/docs/destructors.html>

> As a nice bonus, files and sockets and the like will not require manual close 
> calls anymore.

Now I understand it says pretty clear 'will not' as it's a future plan, but it 
seemed the document was describing things as they work in 1.6.4 and I wanted to 
not worry about closing everything so I interpreted it how I wished to be true 
:) until I saw that the sockets weren't actually closing unless I closed them. 
I looked at the std lib in devel branch and it also doesn't have it either. Of 
course we can implement our own socket type with =destroy method that closes 
it, but is there a reason it's not added to the socket and file types in the 
std library? It seems like a small change that can't break any existing code? 
and would be quite a nice bonus to not worry that socket or file descriptors 
can leak

Reply via email to