The key point is, it's not language magic. It's library magic. You can write your own IO implementation if you want it to work a different way.