Proposal: Implicit Function Template Value Instantiation
Quirin Schroll
qs.il.paperinik at gmail.com
Wed Sep 28 19:10:50 UTC 2022
On Wednesday, 28 September 2022 at 14:00:51 UTC, Steven
Schveighoffer wrote:
> On 9/28/22 8:59 AM, 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.
>
> "had to" is a strong term. I didn't and don't ever plan to.
>
> I'm not interested in template bloat for something that works
> perfectly fine without it. I don't need the compiler to tell me
> that `writefln("%s = %s", a, b)` is correct.
>
> And I certainly don't want the compiler to make this choice for
> me.
Because of this post, the DIP draft now suggests a way to use
`enum` parameters without unnecessary template bloat: `@nodbi`
(read: no design by introspection) effectively makes the
parameter a run-time parameter, but allows checks in contracts
and static asserts.
More information about the Digitalmars-d
mailing list