DIP idea: q{}-inspired block mixins

Q. Schroll qs.il.paperinik at gmail.com
Sat Jun 20 13:11:55 UTC 2020


On Thursday, 11 June 2020 at 13:20:43 UTC, Stefan Koch wrote:
> On Thursday, 11 June 2020 at 00:20:35 UTC, Q. Schroll wrote:
>> On Wednesday, 10 June 2020 at 23:51:45 UTC, Q. Schroll wrote:
>>
>> About this:
>>
>>>     enum RW(string typeName, string myname) = "
>>>         mixin[tName = \"%s\", name = \"%s\", _name = \"_%s\"]
>>>         {
>>>             ...
>>>         }
>>>     ".format(typeName, myname, myname);
>>
>> It shouldn't be a template but rather a function. (For Stefan)
>
> std.format.format is mighty expensive ;)
>
> your proposal would make that a built-in right?

Not really. What format does here is putting strings together. My 
proposal never intended to splice in numeric or other things.


More information about the Digitalmars-d mailing list