February 08, 2023
On Monday, 23 January 2023 at 01:28:30 UTC, Ali Çehreli wrote:

> I agree with Adam here. The language should provide solutions and the programmer should pick appropriate ones.

Then just add `static class`, as it will provide a solution without robbing you of another solution. You still can put symbols in a module even if `static class` is a thing. `static class` doesn't break existing solutions, it just adds things on top.


> OOP is always a solution where it makes sense. I've been very happy with writing free-standing functions and dumb data types that the functions operate on... until... some invariant matters. Then I make the function a member, etc.
>
> Perhaps because I don't buy into the "everything is a class" anymore, I am very happy with D's approach. Mostly structs and functions for me. But I use classes as well when they make sense.

Good. Now, let people have OOP and "everything is a class" if they want to.

> Having said all that, I realize that your asking specifically for static classes made me think of a solution around classes. However, doesn't D has the equivalent in structs? Isn't the following what you are looking for?
>
> struct Algo {
>     static void drawLine(Canvas c, Pos from, Pos to) { ...... };
> }
>
> Now the user is forced to use it like this:
>
>   Algo.drawLine(new Canvas(), new Pos(5, 3), new Pos(7, 9));
>
> or this:
>
>   Algo().drawLine(/* ... */);
>
> but that can be @disabled.

I think it's better to have a widespread commonly known solution than hacks that you have to specifically look for. D is guilty with having too many hacks that you have to specifically learn about.


February 08, 2023

On Friday, 20 January 2023 at 11:28:23 UTC, thebluepandabear wrote:

>

Hi,

In Java/C# you can create purely static classes.
...

Last time, someone proposed to add private like C++'s, and then it was the same,they are always unwilling to add facilities useful to others, and then he left D.

February 08, 2023

On Wednesday, 8 February 2023 at 12:07:35 UTC, zjh wrote:

>

they are always unwilling to add facilities useful to others,

D's community is small, this is the reason!

February 08, 2023

On Wednesday, 8 February 2023 at 12:10:59 UTC, zjh wrote:

>

On Wednesday, 8 February 2023 at 12:07:35 UTC, zjh wrote:

>

they are always unwilling to add facilities useful to others,

D's community is small, this is the reason!

yeah, I've already switched to Java because of this. but I still think the language has potential in the future

February 08, 2023

On Wednesday, 8 February 2023 at 12:12:57 UTC, thebluepandabear wrote:

>

but I still think the language has potential in the future

I don't know if they have a sense of crisis. Now D in tiebo ranks 50.

February 09, 2023

On Wednesday, 8 February 2023 at 13:32:46 UTC, zjh wrote:

>

On Wednesday, 8 February 2023 at 12:12:57 UTC, thebluepandabear wrote:

>

but I still think the language has potential in the future

I don't know if they have a sense of crisis. Now D in tiebo ranks 50.

I wouldn't say they have or should have a sense of crisis, the language itself is improving on a day-to-day basis but it isn't gaining popularity. I initially came in excited learning D because I thought that having a small ecosystem would just be a minor pain, but now I realize it's not minor -- it's pretty major. This is not to say D isn't a good language, it certainly is pretty good, but it just needs a bigger ecosystem. The community itself is great, no weirdos in it like Rust, but it just needs to be bigger.

I am actually taking a computer science class and I need to create desktop apps to pass and get through school. I thought this would be possible with D, but it has turned out to be a massive pain, so this is why I am switching to Java.

I think D may be one of those languages that eventually blows up like Rust because it's honestly great (it feels like a native Java some times), they just need to work on marketing and strengthening the ecosystem.

Some corporate backing (RedHat, for example) would also be great since many people are working on it for free, and thus lacking in motivation.

anyways I know nobody cares about my opinion, and hopefully this didn't come across disrespectful

February 09, 2023
On Thursday, 9 February 2023 at 12:31:03 UTC, thebluepandabear wrote:
> I am actually taking a computer science class and I need to create desktop apps to pass and get through school.

This is pretty easy in D. Like what specific kind of desktop app?
February 09, 2023

On Wednesday, 8 February 2023 at 12:10:59 UTC, zjh wrote:

>

On Wednesday, 8 February 2023 at 12:07:35 UTC, zjh wrote:

>

they are always unwilling to add facilities useful to others,

D's community is small, this is the reason!

yeah right let's implement everything that people propose

February 09, 2023
On Thursday, 9 February 2023 at 12:50:48 UTC, Adam D Ruppe wrote:
> On Thursday, 9 February 2023 at 12:31:03 UTC, thebluepandabear wrote:
>> I am actually taking a computer science class and I need to create desktop apps to pass and get through school.
>
> This is pretty easy in D. Like what specific kind of desktop app?

For my school I am commissioned to create many types of software. I tried to have a look at some of the gui kits in D but there was no tutorial for how to use them and they seemed as if they are lacking features in comparison to Qt/JavaFX.
February 09, 2023

On Thursday, 9 February 2023 at 12:55:41 UTC, Guillaume Piolat wrote:

>

On Wednesday, 8 February 2023 at 12:10:59 UTC, zjh wrote:

>

On Wednesday, 8 February 2023 at 12:07:35 UTC, zjh wrote:

>

they are always unwilling to add facilities useful to others,

D's community is small, this is the reason!

yeah right let's implement everything that people propose

that's not the point of this thread here :P Of course you dont add stuff on the whim if one person says you should, I am just encouraging open ended discussion.