Thread overview | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
September 21, 2020 What are the prominent downsides of the D programming language? | ||||
---|---|---|---|---|
| ||||
Hi, I'm looking for healthy conversation. What are the prominent downsides of the D programming language? |
September 21, 2020 Re: What are the prominent downsides of the D programming language? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tomcruisesmart | On Monday, 21 September 2020 at 09:29:21 UTC, Tomcruisesmart wrote:
> Hi,
> I'm looking for healthy conversation.
> What are the prominent downsides of the D programming language?
One downside is that classes can't inherit from multiple classes. I know that there is a thing called an interface which a class can inherit more that one of those. Thing is, functions in interfaces have to be abstract. Also, member variables declared in an interface have to be static, and the only member functions that are defined have to be static. Why can't we just inherit from multiple classes?
|
September 21, 2020 Re: What are the prominent downsides of the D programming language? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tomcruisesmart | On Monday, 21 September 2020 at 09:29:21 UTC, Tomcruisesmart wrote:
> Hi,
> I'm looking for healthy conversation.
> What are the prominent downsides of the D programming language?
It doesn't distinguish raw and managed pointers which prevents the D language from changing GC algorithms to for example reference counting.
|
September 21, 2020 Re: What are the prominent downsides of the D programming language? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ruby The Roobster | On Monday, 21 September 2020 at 09:35:10 UTC, Ruby The Roobster wrote:
> On Monday, 21 September 2020 at 09:29:21 UTC, Tomcruisesmart wrote:
>> Hi,
>> I'm looking for healthy conversation.
>> What are the prominent downsides of the D programming language?
>
> One downside is that classes can't inherit from multiple classes.
> I know that there is a thing called an interface which a class can inherit more that one of those. Thing is, functions in interfaces have to be abstract. Also, member variables declared in an interface have to be static, and the only member functions that are defined have to be static. Why can't we just inherit from multiple classes?
I hate that it compiles so fast. I used to be able to watch a lot more youtube videos when I used C++.
|
September 21, 2020 Re: What are the prominent downsides of the D programming language? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ruby The Roobster | On Monday, 21 September 2020 at 09:35:10 UTC, Ruby The Roobster wrote:
> On Monday, 21 September 2020 at 09:29:21 UTC, Tomcruisesmart wrote:
>> Hi,
>> I'm looking for healthy conversation.
>> What are the prominent downsides of the D programming language?
>
> One downside is that classes can't inherit from multiple classes.
> I know that there is a thing called an interface which a class can inherit more that one of those. Thing is, functions in interfaces have to be abstract. Also, member variables declared in an interface have to be static, and the only member functions that are defined have to be static. Why can't we just inherit from multiple classes?
Multiple inheritance would really complicate the language, and it's benefits are held not to be sufficient to outweigh the downside of that.
Another very important thing to bear in mind is to prefer composition over inheritance - a simple maxim but very very true (IMO). Google it for more details.
In the seventies and eighties oject orientation was very fashionable and books like "Learn C++ in 24 hrs" were mainly filled with the complexities of inheritance. This made us think that inheritance was the preferred way to share functionality between classes of objects. As it turns out, it's not (IMO).
|
September 21, 2020 Re: What are the prominent downsides of the D programming language? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ruby The Roobster | On 9/21/2020 2:35 AM, Ruby The Roobster wrote:
> One downside is that classes can't inherit from multiple classes.
That's a feature, not a downside. I'm not joking.
Multiple inheritance is a horrible abstraction, all it does is confuse people.
|
September 21, 2020 Re: What are the prominent downsides of the D programming language? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tomcruisesmart | On 9/21/2020 2:29 AM, Tomcruisesmart wrote:
> What are the prominent downsides of the D programming language?
It makes you sad when your employer makes you use another language.
|
September 21, 2020 Rant time? Rant time. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tomcruisesmart | On Monday, 21 September 2020 at 09:29:21 UTC, Tomcruisesmart wrote: > Hi, > I'm looking for healthy conversation. > What are the prominent downsides of the D programming language? Okay, real talk. D is *incredibly* uneven. When it works well, it works great. When it breaks, it can break in really horrible ways that I can't accurately describe except by referencing Mickens' seminal article on systems programming [1] - that is what it is like, except replace pointers with templates. Parts of the language are outright broken, everyone knows they're broken, this is not documented *anywhere*. Parts of the standard library are not meant to be used. There's replacements that got proposed years ago and are languishing. Key projects that replace Phobos are written by individuals who may or may not reachable for issues. And there *will* be issues - templates can't be unittested completely at the site of definition, because you don't know all the cases you will encounter, so you can't even predict the types of your own variables sensibly. immutable is broken with a good fraction of language and runtime features. shared is broken with another fraction. Synchronized has a hole the size of a truck that is unfixable without pulling in all of shared for no benefit. Incredibly useful DIPs like formatting string literals or named parameters are decided not by any kind of vote system, but by "let's see if anyone says in the thread that they don't like it, and then we won't do it." This leads to horrible DIPs that try to placate those people, which then leads to other people complaining that the DIP doesn't go far enough. There is no winning there, which is why language improvements are either trivial or depend on Walter deciding to just go for it. Dub is the official build manager. Dub is included with the D distro. Dub has an open bug where it simply ignores the selected version when you try to run a binary with dub. Look at the unit-threaded prebuild line. [2] Just ... look at it. Dub has 424 open bugs. Let's not talk about how many open bugs DMD has. You can learn the core of D in an afternoon. You can get a good understanding of D in a month. Coming from C, D really is an incredible logically-designed language, and it's a joy to use. That's not the bad part of learning D. The bad part is the years of picking up the problematic parts, the features to avoid, and the parts that are just silently broken. The bad part is the hours spent exploring "maybe I can do X", getting incredibly close, then failing due to a bug reported in 2012. There's a reason so many D devs run off to develop their own language. D shows you what is possible with C-like languages, then falls short. It ruins you for other languages, but it's too frustrating to really love. Still the best language I know. At least for now, until my current compiler project is off the ground... [1] https://www.usenix.org/system/files/1311_05-08_mickens.pdf [2] https://github.com/atilaneves/unit-threaded search for preBuildCommands |
September 21, 2020 Re: Rant time? Rant time. | ||||
---|---|---|---|---|
| ||||
Posted in reply to FeepingCreature | On Monday, 21 September 2020 at 10:55:22 UTC, FeepingCreature wrote:
> On Monday, 21 September 2020 at 09:29:21 UTC, Tomcruisesmart wrote:
>> Hi,
>> I'm looking for healthy conversation.
>> What are the prominent downsides of the D programming language?
>
> Okay, real talk.
>
> D is *incredibly* uneven.
>
> When it works well, it works great. When it breaks, it can break in really horrible ways that I can't accurately describe except by referencing Mickens' seminal article on systems programming [1] - that is what it is like, except replace pointers with templates.
>
> Parts of the language are outright broken, everyone knows they're broken, this is not documented *anywhere*.
>
> Parts of the standard library are not meant to be used. There's replacements that got proposed years ago and are languishing. Key projects that replace Phobos are written by individuals who may or may not reachable for issues. And there *will* be issues - templates can't be unittested completely at the site of definition, because you don't know all the cases you will encounter, so you can't even predict the types of your own variables sensibly.
>
> immutable is broken with a good fraction of language and runtime features. shared is broken with another fraction. Synchronized has a hole the size of a truck that is unfixable without pulling in all of shared for no benefit. Incredibly useful DIPs like formatting string literals or named parameters are decided not by any kind of vote system, but by "let's see if anyone says in the thread that they don't like it, and then we won't do it." This leads to horrible DIPs that try to placate those people, which then leads to other people complaining that the DIP doesn't go far enough. There is no winning there, which is why language improvements are either trivial or depend on Walter deciding to just go for it.
>
> Dub is the official build manager. Dub is included with the D distro. Dub has an open bug where it simply ignores the selected version when you try to run a binary with dub. Look at the unit-threaded prebuild line. [2] Just ... look at it. Dub has 424 open bugs. Let's not talk about how many open bugs DMD has.
>
> You can learn the core of D in an afternoon. You can get a good understanding of D in a month. Coming from C, D really is an incredible logically-designed language, and it's a joy to use. That's not the bad part of learning D.
>
> The bad part is the years of picking up the problematic parts, the features to avoid, and the parts that are just silently broken. The bad part is the hours spent exploring "maybe I can do X", getting incredibly close, then failing due to a bug reported in 2012.
>
> There's a reason so many D devs run off to develop their own language. D shows you what is possible with C-like languages, then falls short. It ruins you for other languages, but it's too frustrating to really love.
>
> Still the best language I know. At least for now, until my current compiler project is off the ground...
>
> [1] https://www.usenix.org/system/files/1311_05-08_mickens.pdf
>
> [2] https://github.com/atilaneves/unit-threaded search for preBuildCommands
Head, meet nail.
Nail, meet head.
|
September 21, 2020 Re: Rant time? Rant time. | ||||
---|---|---|---|---|
| ||||
Posted in reply to FeepingCreature | On 21.09.20 12:55, FeepingCreature wrote: > Okay, real talk. > > D is *incredibly* uneven. > [... more good stuff ... ] > > The bad part is the years of picking up the problematic parts, the features to avoid, and the parts that are just silently broken. The bad part is the hours spent exploring "maybe I can do X", getting incredibly close, then failing due to a bug reported in 2012. > > There's a reason so many D devs run off to develop their own language. D shows you what is possible with C-like languages, then falls short. It ruins you for other languages, but it's too frustrating to really love. > > Still the best language I know. At least for now, until my current compiler project is off the ground... So say we all. |
Copyright © 1999-2021 by the D Language Foundation