May 14, 2022

On Saturday, 14 May 2022 at 13:40:11 UTC, Ola Fosheim Grøstad wrote:

>

I think D should forget about C++ and do C interop well. Too late to go for C++ now.

You're wrong. Interfacing with C++ is very beneficial! Of course, now just ImportC.

Interfacing with C is very beneficial.This is also the reason why there is ImportC. C++'s successful is largely because of it!
Interfacing with C++ is also very beneficial. The ecology of C++ is too large. You will meet C++ everywhere. Only by interfacing with C++, the ecology of d will grow up calmly. The so-called back to the tree to enjoy the cool!
If rust grows up, we also need to link it.
You first at the corner and then to the center.
Let theirs are mines!

May 14, 2022

On Saturday, 14 May 2022 at 14:37:49 UTC, zjh wrote:

>

Let theirs are mines!

Take another example. Just like go always advertises simplicity, but why does it have to add 'generics'?
Because it must learn successful language's experience!

May 14, 2022

On Saturday, 14 May 2022 at 14:37:49 UTC, zjh wrote:

>

On Saturday, 14 May 2022 at 13:40:11 UTC, Ola Fosheim Grøstad wrote:

>

I think D should forget about C++ and do C interop well. Too late to go for C++ now.

You're wrong. Interfacing with C++ is very beneficial! Of course, now just ImportC.

Wrong or not, after importC is done there will be no way back, there is a limit to how far you can stretch an implementation.

May 14, 2022
On Saturday, 7 May 2022 at 07:00:52 UTC, Walter Bright wrote:
> On 5/6/2022 11:59 AM, tastyminerals wrote:
>> And I would love D to just `import awesomeClib;`.
>
> That's very much what ImportC is all about.

That is great indeed! I've just skimmed over ImportC article. No code examples how to do it unfortunately, it looks incomplete. Luckily, I found a D forum question about ImportC where people explain that all you need to do is to import a C file into your D code, it should work.

Why a simple code example is missing from the article brings me to the topic of this thread. I wish D could "market" and explain its awesome features the way other more popular but (in my opinion) less feature rich languages do. With concrete code examples and easy to read text.
May 14, 2022
On 5/14/2022 9:13 AM, tastyminerals wrote:
> Why a simple code example is missing from the article brings me to the topic of this thread.

Which ImportC article? Or did you mean the documentation? We can improve it.
May 15, 2022
On Saturday, 14 May 2022 at 17:25:51 UTC, Walter Bright wrote:
> On 5/14/2022 9:13 AM, tastyminerals wrote:
>> Why a simple code example is missing from the article brings me to the topic of this thread.
>
> Which ImportC article? Or did you mean the documentation? We can improve it.

Why is D unpopular?
I think the current language is good enough, but the IDE for programmers is not good enough, not smart enough to read and refactor code easily.
May 15, 2022
On Sunday, 15 May 2022 at 00:55:32 UTC, electricface wrote:
> On Saturday, 14 May 2022 at 17:25:51 UTC, Walter Bright wrote:
>> On 5/14/2022 9:13 AM, tastyminerals wrote:
>>> Why a simple code example is missing from the article brings me to the topic of this thread.
>>
>> Which ImportC article? Or did you mean the documentation? We can improve it.
>
> Why is D unpopular?
> I think the current language is good enough, but the IDE for programmers is not good enough, not smart enough to read and refactor code easily.

I think it might be better to use a part of the D compiler front-end as a language server, preferably to support all the good features of the language.
May 15, 2022
On Saturday, 14 May 2022 at 13:40:11 UTC, Ola Fosheim Grøstad wrote:
> On Saturday, 14 May 2022 at 10:44:39 UTC, Tejas wrote:
>> We should try to get D _inside_ Clang?
>
> I think D should forget about C++ and do C interop well. Too late to go for C++ now, better to do one thing well once the decision has been made to focus on C.

ImportC goes well beyond the need for C interop.

btw. If ones stops for a moment, and considers the two most popular programming languages (C and Java) - how many software projects exist that use a combination of these two languages?

There is no actual market for ImportC, in the 'real' world.

It's really just a 'see what we can do' thing, which will leave considerable technical debt for the D 'community'.

May 14, 2022
On 5/14/2022 6:44 PM, forkit wrote:
> There is no actual market for ImportC, in the 'real' world.


People are already using it.
May 15, 2022
On Sunday, 15 May 2022 at 01:51:23 UTC, Walter Bright wrote:
> On 5/14/2022 6:44 PM, forkit wrote:
>> There is no actual market for ImportC, in the 'real' world.
>
>
> People are already using it.

Times have changed, and hardware performance is constantly improving.
Programmers need to be able to easily get the most valuable feedback on their code from the language server.

Errors given by the compiler are displayed quickly.
Show exactly the type of the variable.
Query exactly where the function is called.
Exactly where the query function is defined.
Also support refactoring code, you can't not adjust your code.

Advanced features of the language should also be supported:
CTFE
Generics
template
mixin
UFCS
and many more

The D language adds too many functions, which makes it difficult to implement the language server.