If you could make any changes to D, what would they look like?

Basile B. b2.temp at gmx.com
Sun Oct 24 19:47:10 UTC 2021


On Sunday, 24 October 2021 at 19:00:17 UTC, Paul Backus wrote:
> On Sunday, 24 October 2021 at 17:42:28 UTC, Gavin Ray wrote:
>> I cannot use UFCS at all because Code-D for VS Code isn't able 
>> to properly resolve them using the community Serve-D lang 
>> server.
>
> Genuine question: is it really so difficult to write such code 
> "by hand"? I understand that language servers are convenient, 
> but I find it almost impossible to imagine being completely 
> unwilling or unable to write code without one.

I believe it's partly a problem of lazyness, e.g "I want to type 
less. I want to be proposed `filter` when I CTRL+SPACE after 
`arr.fi` ".

That case can be solved by doing a word split on the current 
document and by adding the results to the "good" completions when 
they are requested. If you have selective imports at the top of 
the module, for filter, map, each etc. then they are proposed as 
well.

The other part of the problem is that completion can be used to 
overcome the lack of knowledge of an API, for example. In this 
case the word split does not help.

> I ask because I suspect most D users (including core 
> contributors) regard this sort of tooling support as "nice to 
> have," but not "essential", and therefore do not give a high 
> priority to improving it. If it really is "essential" to a 
> significant fraction of programmers, we might want to rethink 
> that stance.


More information about the Digitalmars-d mailing list