writefln patterns with mismatching compile-time known number of arguments
ketmar via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Apr 12 07:33:03 PDT 2015
On Sun, 12 Apr 2015 14:18:21 +0000, JR wrote:
> But the compiler has all the pieces of information needed to see it's
> wrong, doesn't it?
no, it doesn't. compiler doesn't know about `std.format.format` and it's
special abilities. while it is possible to add such checks to the
compiler, it will introduce interdependency between compiler and phobos,
which is not desirable.
writing CTFE `writef` version is possible without template bloat in
binary, but it will take more memory in compile time and slows
compilation. there were talks about having `writef!"fmt"(args)` in phobos,
but nobody took that task yet.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20150412/ef127d97/attachment.sig>
More information about the Digitalmars-d-learn
mailing list