DIP 1020--Named Parameters--Community Review Round 2

rikki cattermole rikki at cattermole.co.nz
Tue Sep 10 16:09:39 UTC 2019


On 11/09/2019 3:45 AM, 12345swordy wrote:
> On Tuesday, 10 September 2019 at 14:19:02 UTC, rikki cattermole wrote:
>> On 11/09/2019 2:01 AM, 12345swordy wrote:
>>> Issues with the "@named" attribute:
>>> 1.This is opt-in rather then opt-out, which may causes users to beg 
>>> the library maintainers to update their libraries to support name 
>>> attribute.
>>
>> This is intended.
>> If you want to override the intention of the API author then we need 
>> to find another solution. One which I am unsure about how good it 
>> would be.
> 
> Make it an opt-in compiler flag.
> 
> Alex

I do not believe a flag like this is a good solution.
Over the years there has been a lot of talk about how bad -property is 
and it is similar in function to what you are proposing.

However I do have a syntax in mind if there is an overwhelming call to 
support overriding the API makers intention for an API.

The problem with it is, I have no idea how it would be implemented. But 
Walter seems to, so if the desire is there by enough people I guess I 
would have to add it.

I do think we would regret it, but at least with the syntax I'm thinking 
of it would be easy to remove should I turn out to be correct ( 
``!Identifier:`` ).


More information about the Digitalmars-d mailing list