We noticed today when running a swift CLI program to a pipe that stdout is 
fully buffered (e.g. not unbuffered, not line-buffered).  So just now we 
committed unbuffering IO to a bunch of CLI programs.

Is this the right default behavior for Swift?

I realize this is a Cism with a long history, but I think an argument can be 
made that the Cism is surprising (in that: it surprised us). I think most Swift 
developers would assume "print" to be line-buffered.

Requiring programs to opt-in to linebuffering so they can work via pipe feels 
wrong to me.  Am I crazy?

Drew
_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

Reply via email to