The year is 2019

Mike Franklin slavo5150 at yahoo.com
Fri Jul 26 01:53:18 UTC 2019


On Friday, 26 July 2019 at 01:27:01 UTC, 12345swordy wrote:
> Multi alias this is still not implemented. At this point of 
> time I might as well  create a pr request that deprecate the 
> alias this feature as it quite clearly that walter doesn't like 
> it and hates implicit conversion for user types in general 
> irregardless of design.
>
>
> -Alex

I don't think that's the way to affect change, and your PR will 
just be closed, or worse, ignored.  We can't deprecate `alias 
this` (at least in the near-to-medium term), but we may be able 
to provide alternatives.

Andrei mentioned in a previous post that we've been too worried 
about making changes 
(https://forum.dlang.org/post/q7j3s0$15n7$1@digitalmars.com), and 
he advocated for changes that are "addition only".  Of course, 
such changes still need to carry their weight, but it may be 
possible to add a feature to the language that is superior to 
`alias this` allowing it to gradually fall out of fashion, and in 
the long term, deprecated.

If you want to move D forward in this regard, you have to 
strategize and make a good case for your changes.  It's quite 
difficult, but also quite possible if you remain diplomatic and 
professional.

Timing also plays a role.  I believe Walter accepted some of my 
PRs for optional runtime features because he was also working on 
betterC at the time and those changes were congruent with his 
priorities at the time.

I'm working on a proposal for `alias this`, but I need to make a 
strong case for it, and that can take a lot of time and effort.  
I know you had some ideas for making `opImplicitCast` more 
appealing.  I'd be interested in hearing more about that, and if 
I think it will help my case, I'll incorporate them.

Think about what it is that Walter cares about and consider how 
your proposal can provide him something he's been wanting.  I 
think Walter is concerned about language and compiler complexity. 
  There may be an opportunity there to improve the `alias this` 
implementation so the language and compiler will be less complex, 
and that may earn his support.

It's true that once Walter has an idea in his head, it's 
extremely difficult to change his mind, but he's also not the 
only one that needs convincing.  With a well-written DIP, and a 
strong case, Atila may get on board and provide the support 
needed to approve the feature.

Mike


More information about the Digitalmars-d mailing list