Proposal: Implicit Function Template Value Instantiation
jmh530
john.michael.hall at gmail.com
Wed Sep 28 13:29:14 UTC 2022
On Wednesday, 28 September 2022 at 12:59:08 UTC, FeepingCreature
wrote:
> Everybody had to move from `writefln("%s = %s", a, b)` to
> `writefln!"%s = %s"(a, b)` in order to get the benefit of
> static format string syntax checking.
>
> This was annoying. What's more, it was unnecessary. Why not
> just:
>
> ```
> void writefln(string fmt, T...)(fmt, T args)
> ```
> [snip]
That's an interesting idea, but what would be the advantage of
this (or something like it) versus the Enum Parameters DIP [1]?
I'm also not so trilled with the `fmt` in the second set of
parentheses not having a type associated with it. I don't know if
that would cause your linking errors.
[1]
https://forum.dlang.org/thread/gvypfkueypukgvxnfgtx@forum.dlang.org
More information about the Digitalmars-d
mailing list