questions on PhanTango 'merger' (was Merging Tangobos into Tango)- long-term vision

BCS ao at pathlink.com
Thu Oct 11 08:30:07 PDT 2007


Reply to Chad,

> Lars Ivar Igesund wrote:
> 
>> How on earth is
>> 
>> Cout("somestring"); more "complex" than writef (write actually)?
>> 
> ooo, something I have issue with...
> 
> Cout doesn't do formatting.
> Stdout doesn't do formatting.
> So
> writefln("number: %d", number);
> becomes
> Stdout.formatln("number: {0}", number);
> Why doesn't plain Stdout do this?
> Oh, and even if it did,
> Stdout("number: {0}", number);
> would not insert a newline.
> I have to use
> Stdout("number: {0}", number).newline;
> instead, which is again more typing.  I have to type this stuff a lot,
> so I'd like it to be easy.
> It would be really nice to have
> Stdout("number: {0}", number).nl; // .nl for "newline" or .ln for
> "line"
> as a start.  Shorthand is useful in some cases.
> It would be straight awesome to have
> Stdout("Point(op1[{0},{1},{2}],",x,y,z)("op2[{0},{1},{2}])",t,u,v).nl;
> It also scales nicely.  You don't need to understand the above line to
> write a simple Stdout("Hello world!");.
> 
> As I understand it, Cout is a bit more lightweight or somesuch, so I
> don't really have any issues with it, other than that maybe it should
> be hidden away as something only experienced tango users should play
> with as a means of optimizing their programs.
> 
> Text output seems easy enough to generalize, so in that case just
> stick to one /single/ canonical way of doing it that works really well
> and scales.
> 

gneralIdea.votes++;

Give the chained calls overload with formatting directives





More information about the Digitalmars-d mailing list