zoffixznet / IOwesomeness

1 stars 0 forks source link

AP: Make :close behaviour the default in IO::Handle and Its Subclasses #15

Open zoffixznet opened 7 years ago

jnthn commented 7 years ago

My feeling is something like:

So, I guess that means that I think:

This implies that a :close parameter defaulting to False on IO::Handle methods probably is the right thing already.

jnthn commented 7 years ago

And, to be clear, when IO::Path delegates to IO::Handle methods after opening, it would always pass :close. Alternatively, we could have a wrapping iterator that just calls .close when it sees IterationEnd, and then get rid of the :close parameters altogether. That might be even better.