DCD - Improving the tooling

Basile B. b2.temp at gmx.com
Sat Nov 21 17:49:09 UTC 2020

On Saturday, 21 November 2020 at 16:42:15 UTC, Ethan wrote:
> This came about naturally during Robert's talk, and discussing 
> how good UFCS is. Because UFCS is great and I use it 
> extensively. But it can be difficult to use for people used to 
> modern IDEs for one very good reason: DCD doesn't include UFCS 
> in its autocomplete.
> The purpose of this thread is to highlight that we should look 
> at improving DCD here.

This will not happen in DCD. UFCS requires expression semantic 
and template semantic. Do you realize that even just

     class C {int a;}
     (new C).

does not work ? This example has nothing to do with UFC but it's 
just to show that for now DCD does **0** expression semantic, 
even not simple things like 1. find the type of a NewExp, 2. set 
the type of a ParenExp to the the type of its nested UnaryExp. 
Actually dparse does even not decompose UnaryExp properly. To 
have UFCS completion you need to find the type of a full DotVar 
chain, from the type of this chain you must then select all the 
functions visible in the scope and that take as first parameter 
stuff compatible with the chain type. This way much more complex 
that the basic non-working example.

However maybe a DMDFE-based auto completion will support this. 
BTW does't Visual-D support it ?

More information about the Digitalmars-d mailing list