I have to say that I must prefer APIs that do not take arbitrary advantage
of dynamically discovered methods. It makes things less clear, and adding a
wrapper to flush and then close the underlying writer is not hard. In fact
the idiom for doing so is probably the reason why it's not feasible to add
a Close method to `bufio.Writer`. If you do that, then you run the risk of
breaking current code that adds its own Close method:

https://play.golang.org/p/xidNo2Z_OYB

This would definitely break some code that I've written.

   cheers,
      rog.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAJhgacjm-ZmpfXRfbK%3DZN26vRQsJ%3Dfn632tm0iwq%2B3sUGxEayQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to