Thread overview
DCD - Improving the tooling
4 days ago
Ethan
4 days ago
Basile B.
4 days ago
Ethan
4 days ago
Basile B.
4 days ago
Basile B.
2 days ago
RazvanN
2 days ago
RazvanN
4 days ago
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. Initially about UFCS, but I'm certain there's a bunch of other stuff that needs improving. So please go ahead and highlight what you think should be improved.

The conversation went a bit like this (the magic of copy/paste):

FeepingCreature
​I unqualifiedly love ufcs and dropping parentheses

Dennis Korpel
​Biggest problem with UFCS for me is that DCD doesn't auto-complete it

TheRealGooberMan
​That's certainly a tooling problem, not a language problem. Which makes that a very solvable problem

Dennis Korpel
​I know, but it does affect how I write code

Per Nordlöw
​dcd ufcs autocompletion, yes pleeease. why is this so hard to add?

Per Nordlöw
​jump to ufcs-function definition in dcd would be even easier and a feature I miss even more

TheRealGooberMan
​This feels like we should make a forum thread about improving DCD

TheRealGooberMan
​The value proposition is high

Per Nordlöw
​yes please
4 days ago
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 ?
4 days ago
On Saturday, 21 November 2020 at 17:49:09 UTC, Basile B. wrote:
> This will not happen in DCD.

Then that makes DCD unfit for purpose.

Let's talk about changing that.
4 days ago
On Saturday, 21 November 2020 at 18:44:39 UTC, Ethan wrote:
> On Saturday, 21 November 2020 at 17:49:09 UTC, Basile B. wrote:
>> This will not happen in DCD.
>
> Then that makes DCD unfit for purpose.
>
> Let's talk about changing that.

There is a DCD fork that was supposed to change things [1].
If I've followed correctly, the SAOC entry "improve dmd as a library" is supposed to make easier the task. Either that or the attempt is aborted.

[1]: https://github.com/cristiancreteanu/DCD.
4 days ago
On Saturday, 21 November 2020 at 19:06:49 UTC, Basile B. wrote:
> On Saturday, 21 November 2020 at 18:44:39 UTC, Ethan wrote:
>> On Saturday, 21 November 2020 at 17:49:09 UTC, Basile B. wrote:
>>> This will not happen in DCD.
>>
>> Then that makes DCD unfit for purpose.
>>
>> Let's talk about changing that.
>
> There is a DCD fork that was supposed to change things [1].
> If I've followed correctly, the SAOC entry "improve dmd as a library" is supposed to make easier the task. Either that or the attempt is aborted.
>
> [1]: https://github.com/cristiancreteanu/DCD.

Looking at the changes [1], it seems that UFCS support was planned.

[1] https://github.com/dlang-community/DCD/commit/caa9cb38509af9c0ec692ad22500e71c2fed7407
3 days ago
On 22/11/2020 6:49 AM, Basile B. wrote:
> However maybe a DMDFE-based auto completion will support this. BTW does't Visual-D support it ?

I gave it a go to hack visual-d's support of dmd-fe into dcd.

It did not go well...

Also dmd-fe needs to support file offsets not just line/line offset. To make the transition easy.
2 days ago
On Saturday, 21 November 2020 at 19:06:49 UTC, Basile B. wrote:
> On Saturday, 21 November 2020 at 18:44:39 UTC, Ethan wrote:
>> On Saturday, 21 November 2020 at 17:49:09 UTC, Basile B. wrote:
>>> This will not happen in DCD.
>>
>> Then that makes DCD unfit for purpose.
>>
>> Let's talk about changing that.
>
> There is a DCD fork that was supposed to change things [1].
> If I've followed correctly, the SAOC entry "improve dmd as a library" is supposed to make easier the task. Either that or the attempt is aborted.
>
> [1]: https://github.com/cristiancreteanu/DCD.

Yes, Cristi worked on adding the necessary modifications to dmdfe so that we could replace the use of third party tools in DCD with dmdfe. Most of his modifications got in dmdfe and in his local branch he has done most of the work to integrate dmdfe in DCD. However, he got hired and has no time to work on this now. All the bits are there, we just need a champion to take it to the finish line.
2 days ago
On Sunday, 22 November 2020 at 05:36:59 UTC, rikki cattermole wrote:
> On 22/11/2020 6:49 AM, Basile B. wrote:
>> However maybe a DMDFE-based auto completion will support this. BTW does't Visual-D support it ?
>
> I gave it a go to hack visual-d's support of dmd-fe into dcd.
>
> It did not go well...
>
> Also dmd-fe needs to support file offsets not just line/line offset. To make the transition easy.

File offsets have been added [1] under the DMDLIB switch

[1] https://github.com/dlang/dmd/pull/11823
2 days ago
On 23/11/2020 4:43 PM, RazvanN wrote:
> On Sunday, 22 November 2020 at 05:36:59 UTC, rikki cattermole wrote:
>> On 22/11/2020 6:49 AM, Basile B. wrote:
>>> However maybe a DMDFE-based auto completion will support this. BTW does't Visual-D support it ?
>>
>> I gave it a go to hack visual-d's support of dmd-fe into dcd.
>>
>> It did not go well...
>>
>> Also dmd-fe needs to support file offsets not just line/line offset. To make the transition easy.
> 
> File offsets have been added [1] under the DMDLIB switch
> 
> [1] https://github.com/dlang/dmd/pull/11823

Oh sweet.