Open Seelengrab opened 1 year ago
It can mean either of those, as they are functionally equivalent. Following the interface merely means the type should not have a value in a field of those names and not be the expected value. Perhaps it would be clearer to say 'is defined', since that is an existing functional predicate and therefore a bit more precise than 'is present'?
That makes sense, yes; mentioning isdefined
is an improvement.
Still, is IOContext
actually expected to be used for "communication between processes"? So far I've only encountered it in cases where the printing of something based on where the environment of the printing matters, e.g. different terminal sizes necessitating linebreaks and such.
The "between processes" should also be removed, as that is incorrect. In Julia, the phrase "between processes" means the IO is required to be thread-safe for consistency, and that is not true of the example here.
If we don't already, it might be worth mentioning that the interface for this subtype is to have one of .in
, .in_stream
, or Base.pipe_reader
implemented and/or .out
, .out_stream
, or Base.pipe_writer
and optionally .err
or .err_stream
Hmm, should AnnotatedIOBuffer
be an AbstractPipe
not an IO
?
IOContext
claims to be anAbstractPipe
:But doesn't follow that interface:
I'm not 100% sure the "if present" means "if the field exists" or "if the field is set", but either way, this should be cleared up somehow.