December 17
ImportC was created to make interfacing with existing C libraries a *lot* easier.
December 17
On 12/8/2023 1:06 AM, Hors wrote:
> This is one of biggest mistakes in dlang's design. They tried to be "everything" (being both garbage collected and not, being both safe and unsafe system language...), it backfired because as you said, you always need to exclude some people or features.

I often use a mix of gc and malloc in a program - they each have their uses. It's sort of like using a struct or using a class - they coexist fine, and you can mix and match as you please.

Rust also has both safe and unsafe code.

December 18

On Monday, 18 December 2023 at 05:46:20 UTC, Walter Bright wrote:

>

On 12/8/2023 1:06 AM, Hors wrote:

>

This is one of biggest mistakes in dlang's design. They tried to be "everything" (being both garbage collected and not, being both safe and unsafe system language...), it backfired because as you said, you always need to exclude some people or features.

I often use a mix of gc and malloc in a program - they each have their uses. It's sort of like using a struct or using a class - they coexist fine, and you can mix and match as you please.

Rust also has both safe and unsafe code.

Rust has both safe and unsafe, but it's still focus on safety. While dlang doesn't have any focus

December 18
On Monday, 18 December 2023 at 05:46:20 UTC, Walter Bright wrote:
> On 12/8/2023 1:06 AM, Hors wrote:
>> This is one of biggest mistakes in dlang's design. They tried to be "everything" (being both garbage collected and not, being both safe and unsafe system language...), it backfired because as you said, you always need to exclude some people or features.
>
> I often use a mix of gc and malloc in a program - they each have their uses. It's sort of like using a struct or using a class - they coexist fine, and you can mix and match as you please.
>
> Rust also has both safe and unsafe code.

It would be interesting to hear from AAA game devs on this thread regarding their thoughts on garbage collection.

Unreal Engine implemented a garbage collector for their UObject (https://unrealcommunity.wiki/garbage-collection-36d1da) and the collector runs every 30-60 seconds.

Many game studios implement their own STL (Or rather standard library, avoiding templates) in C++ for debuggability and creating special cases for data structures (See EASTL as an example).

I think the major factor with D not being adopted more by AAA studios is legacy C and C++ codebases. Some game studios live title to title, so it's hard to start from scratch. Otherwise there may also exist other approval issues of getting LDC available on consoles with the Developer Kits (Again, need advocates to do this effectively volunteering after work to sell the idea).

Worth also listening to Ethan Watson's talk: https://www.youtube.com/watch?v=7YjLW7anNfc

Anyway, just a few quick thoughts.


December 18
On Monday, 18 December 2023 at 05:46:20 UTC, Walter Bright wrote:
>
> I often use a mix of gc and malloc in a program - they each have their uses. It's sort of like using a struct or using a class - they coexist fine, and you can mix and match as you please.
>
> Rust also has both safe and unsafe code.

Have you ever thought about keeping the raw pointers as they are. Classes are references types that are allocated using GC. Structs are value types that cannot directly be allocated using GC. If you want to allocate a struct using GC they need to be encapsulated in a GC object. Manual heap allocation are entirely done with raw pointers as before.

This is essentially what Swift does, classes are references types that are allocated using GC and structs are value types that you cannot directly allocate on the heap or GC on its own.

This change is breaking change but can be done. A few standard library types must be rewritten though but that is under the hood not so exposed to the programmer.
December 18
On Monday, 18 December 2023 at 10:37:20 UTC, Mike Shah wrote:
> On Monday, 18 December 2023 at 05:46:20 UTC, Walter Bright wrote:
>> On 12/8/2023 1:06 AM, Hors wrote:
>>> This is one of biggest mistakes in dlang's design. They tried to be "everything" (being both garbage collected and not, being both safe and unsafe system language...), it backfired because as you said, you always need to exclude some people or features.
>>
>> I often use a mix of gc and malloc in a program - they each have their uses. It's sort of like using a struct or using a class - they coexist fine, and you can mix and match as you please.
>>
>> Rust also has both safe and unsafe code.
>
> It would be interesting to hear from AAA game devs on this thread regarding their thoughts on garbage collection.
>
> Unreal Engine implemented a garbage collector for their UObject (https://unrealcommunity.wiki/garbage-collection-36d1da) and the collector runs every 30-60 seconds.
>
> Many game studios implement their own STL (Or rather standard library, avoiding templates) in C++ for debuggability and creating special cases for data structures (See EASTL as an example).
>
> I think the major factor with D not being adopted more by AAA studios is legacy C and C++ codebases. Some game studios live title to title, so it's hard to start from scratch. Otherwise there may also exist other approval issues of getting LDC available on consoles with the Developer Kits (Again, need advocates to do this effectively volunteering after work to sell the idea).
>
> Worth also listening to Ethan Watson's talk: https://www.youtube.com/watch?v=7YjLW7anNfc
>
> Anyway, just a few quick thoughts.

C# took up that role, thanks to XNA, Unity, and many studios adopting Windows Forms/WPF alongside C++/CLI for their tooling.

Capcom shipped Devil May Cry for Playstation 5 using their own fork of .NET Core/C#, and is in the process of updating their in-house engine to .NET 8.

D had an opportunity with Remedy, sadly it wasn't picked up by other studios.
December 18

On Sunday, 17 December 2023 at 12:32:13 UTC, Hors wrote:

>

How many is "a lot" actually, we literally only have two sponsors, many of dead projects in DUB and hardly seeing new projects registered (only to get abandoned after a few months or even a few weeks).

There are only two kinds of languages: the ones with many dead projects and the ones nobody use.

>

Also telling they get the job done "quietly", are you trying to hide the fact dlang is nearly dead

It doesn't add anything to the conversation to make ridiculous claims like this with no evidence. Calling D "nearly dead" indicates you're not making a good faith effort to participate in a discussion.

>

and say "they just do it quietly", Dlang's libraries are really limited, you either have to write from scratch, or interop with another language (which will usually require to write some bridge code by hand)

You weren't using Python in the 1990s. You couldn't do a heck of a lot with it. Someone spent a lot of time writing a lot of libraries between then and now. They didn't post complaints, they wrote code. Then once they wrote all those libraries, other people used them.

> >

I wonder how many of those folks are really serious about using the language

Are you telling me I'm not even serious about using the language? Then why I'm even writing here?

My goal is not calling dlang is bad, but I think potential of dlang is being wasted, that's why I am writing here.

What will help this language at this point is working on libraries, documentation, tutorials, etc.

December 18

On Monday, 18 December 2023 at 14:08:19 UTC, bachmeier wrote:

>

On Sunday, 17 December 2023 at 12:32:13 UTC, Hors wrote:

>

How many is "a lot" actually, we literally only have two sponsors, many of dead projects in DUB and hardly seeing new projects registered (only to get abandoned after a few months or even a few weeks).

There are only two kinds of languages: the ones with many dead projects and the ones nobody use.

>

Also telling they get the job done "quietly", are you trying to hide the fact dlang is nearly dead

It doesn't add anything to the conversation to make ridiculous claims like this with no evidence. Calling D "nearly dead" indicates you're not making a good faith effort to participate in a discussion.

>

and say "they just do it quietly", Dlang's libraries are really limited, you either have to write from scratch, or interop with another language (which will usually require to write some bridge code by hand)

You weren't using Python in the 1990s. You couldn't do a heck of a lot with it. Someone spent a lot of time writing a lot of libraries between then and now. They didn't post complaints, they wrote code. Then once they wrote all those libraries, other people used them.

> >

I wonder how many of those folks are really serious about using the language

Are you telling me I'm not even serious about using the language? Then why I'm even writing here?

My goal is not calling dlang is bad, but I think potential of dlang is being wasted, that's why I am writing here.

What will help this language at this point is working on libraries, documentation, tutorials, etc.

It's been +10 year and there's reasons why not many people wants to make libraries for Dlang. from GrimMaple's point:

>

I would've lied if I said you can't use @nogc code in GC code. But in a reasonably sized framework (eg UI framework) @nogc will start bringing in too much issues eventually. Delegates is just one of the things where @nogc issues are apparent. If you want to have a @nogc control in a UI framework and have callbacks/events in it, you are going to force the user of that control to use @nogc code.

The less apparent issue with @nogc are interfaces\subclasses. If you have a @nogc in your interface, you're kind of forcing @nogc onto all of the users of that interface:

GrimMaple is the author of dlangui, and talking about why writing libraries in D is not a good experience.

From me: all languages haves something to offer, like python is beginner friendly, C was the master of it's time, Rust allows you to write good performant and safe code. But I can't really see whats D has to offer, D has many features of course, but when you using libraries, you may need to throw away half of the D.

Another comment by GrimMaple:

>

And it's not like building tools/3rd party for D is a good idea anyway. Since the language can't decide what it wants to be, and you end up having to either overengineer your code, either listen to a lot of complaints how your code is unsupported in certain cases.

GrimMaple here again talks about why writing libraries in D is not a good experience.
If you want developers to use and write libraries for your language, you need to have something good and stable to offer them.

December 18

On Monday, 18 December 2023 at 15:14:51 UTC, Hors wrote:

>

GrimMaple is the author of dlangui, and talking about why writing libraries in D is not a good experience.

Grim is the current maintainer of dlangui, but most the code was written by buggins, who I'd call the author.

December 18

On Monday, 18 December 2023 at 15:31:19 UTC, Adam D Ruppe wrote:

>

On Monday, 18 December 2023 at 15:14:51 UTC, Hors wrote:

>

GrimMaple is the author of dlangui, and talking about why writing libraries in D is not a good experience.

Grim is the current maintainer of dlangui, but most the code was written by buggins, who I'd call the author.

well, thanks for correcting me

3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19