[self-interest] simplicity

Ian Woollard junkmail at wolfkeeper.plus.com
Sun Jun 27 18:16:13 UTC 2004


Michael Latta wrote:

>On Jun 27, 2004, at 8:57 AM, Ian Woollard wrote:
>
>>And the file may be automagically closed as f goes out of scope.
>>
>>But this is unreliable in Java/Self/Smalltalk- you don't know when the
>>GC will get around to release it. I consider this to be a bug in these
>>languages.
>>    
>>
>
>This is inly an issue if you rely on the garbage collector to close 
>files (which most experienced programmers do not).
>
No, no. You should not assume that because that feature involves running 
the destructor in C++ - that the garbage collector should be involved.

My point is that a relatively trivial change to the language gets this 
capability without involving the GC at all.

>In any event this is not a language issue, 
>but a library issue.
>  
>
No. This problem cannot be solved in libraries- only by having a 
diligent programmer call the close function in all cases at the right 
time. I prefer for the language specification to permit the libraries to 
guarantee that this be done automatically.

Is this extra complexity in the language? Yes.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.selflanguage.org/pipermail/self-interest/attachments/20040627/2bb4c639/attachment.html>


More information about the Self-interest mailing list