1 day ago

On Tuesday, 14 October 2025 at 04:30:49 UTC, Steven Schveighoffer wrote:

>

In a conversation on a pull request for one of my libraries, I came across an interesting revelation. Variadic template functions waste resources for the most part, because much of the time, you don't care about the relationship between the parameters. In many such functions, you just process them in a loop.

[…]

But... I still want to write writelines(1, 2, 3, 4). The ergonomics there are nice! Is there some way we can capture this same reduction in complexity while still keeping the nice syntax?

Yes, macros. C++ was onto something.

1 2
Next ›   Last »