Setting field of struct object
TheTeaLady
TheTeaLady at gmail.com
Thu Feb 1 22:19:13 UTC 2024
On Monday, 22 January 2024 at 15:47:23 UTC, bachmeier wrote:
> 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?
Everyone who uses D should be welcome, even if they have a
preference for another language, or a preference for features in
another language.
This is how D will evolve and improve.
And this should include people who don't like the untyped
universe of the D module (specifically, its lack of an optional
mechanism for information hiding within a module). People can
think of it as if it were typed, but this is just an illusion.
This illusion can easily lead to type confusion and inconsistent
and erroneous interactions - i.e. bugs.
To avoid this in D one needs to literally reorganise that untyped
universe into into a typed system. Now your types impose
constraints which will help to enforce their correctness.
Organisation is important of course, but for using types in D,
its vital - if strong typing is your objective.
I think D is clumsy in many other areas as well.
btw. I too prefer multiple inheritance.
More information about the Digitalmars-d-learn
mailing list