MikeTaylor/scottkit

Replace withIO with input and output stream parameters

Opened this issue · 2 comments

This is a follow up to #16 (comment). I'd like to switch from the current method of replacing the global $stdin and $stdout to having the ScottKit::Game accept a input and output streams in the options has. We can default to the current values so it should be a pretty transparent change.

Give me a moment to think this through, please. I want to remember why I made withIO. I admit that what you propose sounds saner, but I must have had a reason!

I admit that withIO is a slightly eccentric approach -- I am still trying to remember why I did it this way -- but is is actively preventing you from doing what you want? Or is this just fixing a smell?