Am 18.10.2019 um 11:33 schrieb Kasper ��sterbye <kasper.osterbye@gmail.com>:

On 18 October 2019 at 08.00.13, Richard O'Keefe (raoknz@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.


I started to do exactly the same. Well I started to do a converter between pillar markup and text attributes, but I think you do the same. We probably should talk. Is you code anywhere public?

Norbert

Best,

Kasper