Feedback Wanted on Homegrown @nogc WriteLn Alternative
monarch_dodra via Digitalmars-d
digitalmars-d at puremagic.com
Fri Oct 3 10:23:30 PDT 2014
On Friday, 3 October 2014 at 17:01:46 UTC, H. S. Teoh via
Digitalmars-d wrote:
> For a compile-string that's statically fixed (i.e.,
> writefln!"..."(...)), we can do a lot more than what ctFmt
> does. For
> example, we can parse the format at compile-time to extract
> individual
> formatting specifiers and intervening string fragments, and
> thereby
> transform the entire writefln call into a series of puts() and
> formattedWrite() calls.
The take home point is that ctFmt would *also* parse the string
at compile time. The difference is that it creates a run-time
object, which still contains enough static information for a
powerful write, yet still some run-time info to be able to swap
them at runtime.
More information about the Digitalmars-d
mailing list