January 22

On Monday, 22 January 2024 at 11:31:11 UTC, zjh wrote:

>

On Monday, 22 January 2024 at 08:54:54 UTC, zjh wrote:
C++ can achieve ultimate simplicity without violating DRY,
And here, D violates the DRY principle!
Moreover, as the package level, module level, class level, member level, D language violates integrity.
Because D has no class level limit.
These are all not serious states.

i think D module base system is fine wished some other lang had the same you can avoid circular import ref.

dry? well he can easily turn that into a generic config static factory which its look like hes trying to do.

D is totally different from C++ in D you usually you wont construct the struct directly use alias as.

January 22

On Monday, 22 January 2024 at 11:31:11 UTC, zjh wrote:

>

On Monday, 22 January 2024 at 08:54:54 UTC, zjh wrote:

>
struct Person {
    string name, email;
    ulong age;
}
Person a{"n","email",33};

C++ can achieve ultimate simplicity without violating DRY,
And here, D violates the DRY principle!
Moreover, as the package level, module level, class level, member level, D language violates integrity.
Because D has no class level limit.
These are all not serious states.

I used to want this feature too, but i then got hit by a bug when i reordered the fields in the struct.. i don't want to deal with that stuff anymore

But we now have named arguments, so this feature could be make use of it, it's similar with enums, perhaps one day this could be revived:

https://github.com/dlang/DIPs/blob/e2ca557ab9d3e60305a37da0d5b58299e0a9de0e/DIPs/DIP1044.md

There is even a working implementation: https://github.com/dlang/dmd/pull/14650

January 22

I should note that it only took me 1 project to never want to touch C++ again.. that must be telling something, either about the language, or me, or both lol

January 22

On Monday, 22 January 2024 at 15:33:01 UTC, ryuukk_ wrote:

>

it only took me 1 project to never want to touch C++ again..

D language used to have no copy constructor, isn't it now added in again?

You have to admit the good aspects of C++.
You should take a look at the latest C++. C++ has already learned many advantages of D, but D has not made significant progress!
As a user, C++ is really not much different from D, and even surpasses D in many aspects.
RAII , variable parameter template, coroutine, concept, value semantics, very easy to understand.
Moreover, the inheritance of C++ is very enjoyable to use in many aspects.

January 22

On Monday, 22 January 2024 at 15:45:45 UTC, zjh wrote:

>

On Monday, 22 January 2024 at 15:33:01 UTC, ryuukk_ wrote:

>

it only took me 1 project to never want to touch C++ again..

D language used to have no copy constructor, isn't it now added in again?

You have to admit the good aspects of C++.
You should take a look at the latest C++. C++ has already learned many advantages of D, but D has not made significant progress!
As a user, C++ is really not much different from D, and even surpasses D in many aspects.
RAII , variable parameter template, coroutine, concept, value semantics, very easy to understand.
Moreover, the inheritance of C++ is very enjoyable to use in many aspects.

Sounds like you should be using C++. Why are you here?

January 22

On Monday, 22 January 2024 at 15:14:32 UTC, Bkoie wrote:

>

D is totally different from C++ in D you usually you wont construct the struct directly use alias as.

Stop being unconventional and quickly copy their good things.
Otherwise, the development speed of the D language is really too slow!

January 22

On Monday, 22 January 2024 at 15:47:23 UTC, bachmeier wrote:

>

Sounds like you should be using C++. Why are you here?

I spent too much time on D.

January 22

On Monday, 22 January 2024 at 15:51:37 UTC, zjh wrote:

>

I spent too much time on D.

And some of the inherent drawbacks of C++ are too hateful.

January 22
On Monday, 22 January 2024 at 15:56:59 UTC, zjh wrote:
> On Monday, 22 January 2024 at 15:51:37 UTC, zjh wrote:
>>
>> I spent `too much time` on D.
>
> And some of the inherent `drawbacks` of `C++` are too hateful.

It's a package deal. Everything in C++ is there because there were benefits when they added it, but those benefits came with downsides. D will end up in the same place if it emulates C++.
January 22

On Monday, 22 January 2024 at 15:49:30 UTC, zjh wrote:

>

Stop being unconventional and quickly copy their good things.
Otherwise, the development speed of the D language is really too slow!

i mean there some truth but all look at this way
rust has new or default to construct
python ? can lead to garbage
d from alias as
etc...