Tuples, CTFE, and Sliding Template Arguments
Walter Bright
newshound2 at digitalmars.com
Sat Jan 13 02:16:06 UTC 2024
On 1/12/2024 4:15 PM, Steven Schveighoffer wrote:
> I don't view this as simpler than DIP1036e or DIP1027 -- a simple transformation
> is a simple transformation.
Adding extra hidden templates isn't that simple. If a user is not using a canned
version, he'd have to be pretty familiar with D to be able to write his own
handler. 1027 is simpler in that if the generated tuple is examined, it matches
just what one would have written using a format. Nothing much to learn there.
> Certainly a hybrid DIP1027 with a format string
> passed at compile time is still not viable, due to reasons already stated.
The other reasons:
1. preventing calls to functions passing an ordinary string as opposed to an
istring tuple
2. preventing nested istrings
have already been addressed. The compile time thing was the only one left.
> This does seem like it has the potential to break code:
The shifted one would be a more costly match, and so the legacy others would be
favored first.
More information about the Digitalmars-d
mailing list