post qualifier and template constraint limitation, is there a reason ?

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Sun Jan 18 19:57:08 PST 2015


On 1/18/2015 7:07 PM, deadalnix wrote:
> On Monday, 19 January 2015 at 02:24:00 UTC, Walter Bright wrote:
>> On 1/18/2015 12:46 AM, Brian Schott wrote:
>>> On Sunday, 18 January 2015 at 08:40:19 UTC, Walter Bright wrote:
>>>> Sounds like a good idea. If I wasn't clear, I think that class change was a
>>>> mistake.
>>>
>>> Now that I see from that pull request that the ugly syntax was the original, I'm
>>> not so sure. The dfix feature I'm planning is to convert
>>>
>>> class A if (B) : C
>>>
>>> to
>>>
>>> class A : C if (B)
>>
>> The other way around. Consider:
>>
>>   class A(T) : C!(args), D!(more args), E!(lots of stuff) if (B)
>>
>> the 'if' becomes significantly separated from A.
>
> That's exactly why I thing both should be allowed.

No. Constraints belong after the template declaration, not embedded in the 
template's implementation.

Furthermore, there's no useful purpose to enabling style wars and then requiring 
people to put one way in their coding standard document.


More information about the Digitalmars-d mailing list