On 18 October 2019 at 08.00.13, Richard O'Keefe (rao...@gmail.com) wrote: When is it pointless to introduce a WriteStream and just use #, ? When #, would not be in a loop or recursion. Constructing error messages, class initialisation code, that sort of thing.
If you find yourself doing a lot of concatenations, you are probably missing an abstraction. For example, building up XML by string concatenation would be very silly: you want to build a tree and have it write itself to a stream. Absolutely agree. Streams use logarithmic extension of buffer, concatenation linear, but it is still amazing to see. I am working on a pillar to `Text` generator. Here I found concatenation to be simpler to handle as I can add bold, italics, indentation, etc. in a much simpler way. To use a streaming method I would have to introduce both Canvas and Aggregate brushes. Doable indeed, but much less concise. Best, Kasper