October 08

On Saturday, 5 October 2024 at 06:35:57 UTC, ryuukk_ wrote:

>

Why is this allowed


struct EntityDef
{
    struct
    {
        int hp;
    }
}

But not this fucking thing?

struct EntityDef
{
    struct
    {
        int hp;
    } stats;
}

Let me name my shit

No, i don't want to do:

struct EntityDef
{
    struct Stats
    {
        int hp;
    } Stats stats;
}

Repeating the same name 3 times, i should go back to the stone age too no?

C and all other C like languages allow me to be concise

Why is it a D thing to be backward?

The problem is clear. What I do not agree with is your tone. I am noone here, but I think it is not good to tolerate this level. It sets a bad precedent.

Just my 2 cents.

October 08

On Tuesday, 8 October 2024 at 18:24:50 UTC, germandiago wrote:

>

What I do not agree with is your tone. I am noone here, but I think it is not good to tolerate this level. It sets a bad precedent.

Just my 2 cents.

This has come up many times before. The powers that be have been clear that this type of post is pefectly acceptable and anyone that doesn't like it should leave.

October 09

On Tuesday, 8 October 2024 at 18:24:50 UTC, germandiago wrote:

>

On Saturday, 5 October 2024 at 06:35:57 UTC, ryuukk_ wrote:

>

Why is this allowed


struct EntityDef
{
    struct
    {
        int hp;
    }
}

But not this fucking thing?

struct EntityDef
{
    struct
    {
        int hp;
    } stats;
}

Let me name my shit

No, i don't want to do:

struct EntityDef
{
    struct Stats
    {
        int hp;
    } Stats stats;
}

Repeating the same name 3 times, i should go back to the stone age too no?

C and all other C like languages allow me to be concise

Why is it a D thing to be backward?

The problem is clear. What I do not agree with is your tone. I am noone here, but I think it is not good to tolerate this level. It sets a bad precedent.

Just my 2 cents.

I'm not a big fan of using declarations as type either:

bool doWeWantThat( struct{ int notsure;} p)
{
    return false;
}

in the same way, named fields in tuples is an aberration to me, because "why not use a struct instead ?"

October 09

On Wednesday, 9 October 2024 at 01:16:29 UTC, Boaz Ampleman wrote:

>

I'm not a big fan of using declarations as type either:

bool doWeWantThat( struct{ int notsure;} p)
{
    return false;
}

Here (int notsure) p would read much better. And we want tuple syntax in the language anyway so we can do destructuring.

>

in the same way, named fields in tuples is an aberration to me, because "why not use a struct instead ?"

When it's a singleton type used in a place you can't declare a struct. Naming tuple fields makes for clearer code rather than having to remember an index in code reviews to decipher what's happening.

1 2 3
Next ›   Last »