Where do you go to find your C++ articles and/or news these days? => How D influences modern C++ libraries
Matthew Wilson
matthew at hat.stlsoft.dot.org
Fri Apr 11 13:25:14 PDT 2008
"janderson" <askme at me.com> wrote in message news:ftmsi0$e9c$1 at digitalmars.com...
> Matthew Wilson wrote:
>
> <snip>
>
> > Part of the reason for this is that it is
> > able to convert logging statement components to string slices (len+ptr) - i.e. like a D string
>
> <snip>
>
> Interestingly enough Walter has talked about changing to ptr+ptrend for
> array/string for efficiency.
Well, that's quite surprising. I started with that representation (in recls) for that very purpose, but the use cases in which that
was an advantage were substantially fewer than those where you need the length. So I've gone with len+ptr in all subsequent
cases/libraries - including Pantheios and FastFormat - and I'm confident (at least for the kinds of things I've done with slices)
that that's the right decision.
Of course, things might be different in D / with what Walter wants to do, but I'm skeptical until demonstrated otherwise.
Just my tuppeneth
Matt
More information about the Digitalmars-d
mailing list