DIP 1027---String Interpolation---Format Assessment

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Feb 25 17:44:02 UTC 2020


On Mon, Feb 24, 2020 at 10:54:34PM -0800, Walter Bright via Digitalmars-d-announce wrote:
[...]
> Writing that an implementation must refer to specific templates
> implies that the behavior is customizable by the user via modifying
> those templates.

I think this is where the misunderstanding is. The proposed template is
defined by druntime, and is NOT customizable by the user.

Unless, of course, they modify druntime, but then, if they're going to
do that, they could just as easily modify the meaning of various
internal symbols in druntime that dmd refers to, like change _adEq2 to
do something completely alien. But the expectation is that users
generally would not do this.

Similarly, wrapping the interpolated tuple in a template is not
customizable by the user. Rather, its sole purpose is to provide a
distinct type from `string` that user can overload on, if they so wish.


T

-- 
The easy way is the wrong way, and the hard way is the stupid way. Pick one.


More information about the Digitalmars-d-announce mailing list