|
About speed: the current implementation does a #critical: access and #flush after each #show: so it won't be that fast in execution speed, but fast in producing results in the output (std or file) which is important too.
About encoding: neither Stdio nor File does any encoding on their raw streams, so writing anything but ASCII (or Latin1) will fail.
These are separate points from the functional issue at hand.
I would go for:
<code> initializeStream "Open the file stream that I write to or connect to #stdout. I use the proper line end convention. I will append to regular files."
^ stream := self isStdout ifTrue: [ Stdio stdout ] ifFalse: [ self isStderr ifTrue: [ Stdio stderr ] ifFalse: [ (File named: self fileName) openForAppend ] ] </code>
But I have to test it.
We need some unit tests too.
Do you want me to do a PR ?
|
|
|
Priority: 1 – Show Stopper !!!!!!
|
|
Status: Work Needed
|
|
Assigned to: Everyone
|
|
Milestone: Pharo7.0
|
Go to Case
|
|