August 10
On Saturday, 10 August 2024 at 12:42:29 UTC, Richard (Rikki) Andrew Cattermole wrote:
> On 11/08/2024 12:26 AM, IchorDev wrote:
>>     Rikki should submit a PR, make it available trhought a -preview, and
>>     we move on, at some point we vote and we see how it goes, just like
>>     Walter did for bitfields preview
>> 
>> I think Walter would likely block such a PR. Bitfields can get in that way because it’s Walter’s thing, this is different.
>
> Until I get the go ahead, given his strong opinions in the past, that is my current assumption.

Why are people scared of walter? he won't eat you, i can't tell you what you should be doing, but don't let anybody hold you back, push harder, make it a -preview flag

Many people voiced their positive opinion, we'll back you

Too many things are happening in closed doors, it's sad
August 11
On 11/08/2024 5:50 AM, ryuukk_ wrote:
> On Saturday, 10 August 2024 at 12:42:29 UTC, Richard (Rikki) Andrew Cattermole wrote:
>> On 11/08/2024 12:26 AM, IchorDev wrote:
>>>     Rikki should submit a PR, make it available trhought a -preview, and
>>>     we move on, at some point we vote and we see how it goes, just like
>>>     Walter did for bitfields preview
>>>
>>> I think Walter would likely block such a PR. Bitfields can get in that way because it’s Walter’s thing, this is different.
>>
>> Until I get the go ahead, given his strong opinions in the past, that is my current assumption.
> 
> Why are people scared of walter? he won't eat you, i can't tell you what you should be doing, but don't let anybody hold you back, push harder, make it a -preview flag

I'm not scared of him, also this isn't something you'd put under a preview flag.

> Many people voiced their positive opinion, we'll back you
> 
> Too many things are happening in closed doors, it's sad

That's not what is going on here.

I asked Walter to look into it and get back to me 2 months ago at the monthly meeting and prepared the materials he requested.

He has been on the backend, a very different subject matter so I haven't been wanting to force it.

I also know he has strong opinions about it, which offsets my desire to waste my time on something he'll likely want to say no to.

However, it's clear to me that I'm wasting my time in not doing it.

I have no guarantees about if I can get to it in the next two weeks. The next two weeks is going to be spent on escape analysis, as we're looking at replacing it.
August 11

On Sunday, 11 August 2024 at 07:11:01 UTC, Richard (Rikki) Andrew Cattermole wrote:

>

The next two weeks is going to be spent on escape analysis, as we're looking at replacing it.

So DIP1000 won’t become a thing, or it’ll just have a different implementation?

August 11
On 8/10/2024 10:50 AM, ryuukk_ wrote:
> Why are people scared of walter? he won't eat you,

I might if people came with a side of fava beans and a nice chianti.

August 12
On 12/08/2024 8:44 AM, IchorDev wrote:
> On Sunday, 11 August 2024 at 07:11:01 UTC, Richard (Rikki) Andrew Cattermole wrote:
>> The next two weeks is going to be spent on escape analysis, as we're looking at replacing it.
> 
> So DIP1000 won’t become a thing, or it’ll just have a different implementation?

Nothing is set in stone currently.

But we are looking into it one way or another.
August 12

On Saturday, 10 August 2024 at 15:41:28 UTC, ryuukk_ wrote:

>

Nobody wants to write: cClass: Character.Class.KNIGHT or elements: Character.Elements.EARTH | Character.Elements.FIRE

Make us able to write:

cClass: .KNIGHT and elements: .EARTH | .FIRE

Named arguments was a great addition, let's continue in that direction

Yes please thank you. I'd even lean towards excluding the . if at all possible but I assume people predict too many potential conflicts in other code? Either way I'd definitely like to see this working as a preview, it's a lot easier to see if it Just Works or Just Doesn't to try it than to keep it forever locked in council session limbo.

August 12

On Monday, 12 August 2024 at 08:58:59 UTC, cc wrote:

>

I'd even lean towards excluding the . if at all possible but I assume people predict too many potential conflicts in other code?

It would be too ambiguous. If you write a type-inferred enum member that has the same name as a local variable, what happens? The fact that there’s more than one answer means that the programmer can’t be certain without looking it up; wasting their time to use a convenience feature. It’s variable shadowing but with types—bleh! Having a prefix makes your intention explicit, and later you don’t have to contemplate whether you’re looking at a variable/function call, or type inference.

>

Either way I'd definitely like to see this working as a preview, it's a lot easier to see if it Just Works or Just Doesn't to try it than to keep it forever locked in council session limbo.

Well you’re welcome to submit a new PR for the existing implementation but with it locked behind a preview…

August 14

On Monday, 12 August 2024 at 11:47:54 UTC, IchorDev wrote:

>

It would be too ambiguous. If you write a type-inferred enum member that has the same name as a local variable, what happens? The fact that there’s more than one answer means that the programmer can’t be certain without looking it up; wasting their time to use a convenience feature.

I scold myself for using a local variable named the same as an enum member. s'why I like to use all caps for my enums, saves my valuable time so I don't have to look things up ;)
But the compiler already yells at people for ambiguous function usage anyway, worst case scenario is you just have it bark "assigning symbol x to enum type conflicts with local variable x, please use explicit enum reference y.x or cast(y) x to use local variable"
Worst worst case scenario is the user has a local variable of the same type as the enum itself with the same name as one of the enum members in which case he needs to be smacked and made to stand in the front of the class for doing something so silly. And then cast the local to its own type to force it to compile.

>

Well you’re welcome to submit a new PR for the existing implementation but with it locked behind a preview…

Will take me a minute to get up to speed on mucking with the compiler but maybe I'll give it a shot next rainy afternoon

August 14

On Wednesday, 14 August 2024 at 13:30:25 UTC, cc wrote:

>

But the compiler already yells at people for ambiguous function usage anyway

So I considered it a bit, and here's a scenario I could find plausible:

enum SqlResult { ok, error, constraint, } // inferred numeric basetype enum

bool ok;
string error;

SqlResult result;
result = constraint; // no problem
result = ok; // Ambiguous assignment to enum: use explicit SqlResult.ok, or
             // cast(SqlResult) ok to assign local variable
	result = SqlResult.ok; // explicit enum member
	result = cast(SqlResult) ok; // casts bool to SqlResult
result = error;  // actually, this should be ok, because you couldn't cast a string
                 // to a numeric enum anyway, but we could be picky about it anyway


SqlResult ok;
SqlResult result;
result = ok; // This is where things get silly. If you do this, you did something silly.
             // It could conceivably happen somewhere in a billion lines of code, but
             // if it does, the compiler should tell you you're silly. No one is going
             // to be sufficiently harmed by being informed that this is bad practice
             // and forced to throw in a cast() to make their intentions clear.

Globals should already be sorted out by existing syntax. We have the "price to pay" of typing in an explicit Enum. or cast(Enum) but this only comes about if we happened to have a local variable by the same name as an enum member. If you just don't do that, you aren't stripping yourself of any convenience. And if you do, well, what do you want? The compiler can't read your mind ALL the time, but a lot of the time is better than none of the time, otherwise we wouldn't have auto, or template inference, or a whole bunch of other things.

August 14

On Wednesday, 14 August 2024 at 13:30:25 UTC, cc wrote:

>

I scold myself for using a local variable named the same as an enum member.

You and no one else, you do it to yourself.

>

Worst worst case scenario is the user has a local variable of the same type as the enum itself with the same name as one of the enum members in which case he needs to be smacked and made to stand in the front of the class for doing something so silly.

And apparently there are no women in the field of computer science.

>

But the compiler already yells at people for ambiguous function usage anyway, worst case scenario is you just have it bark "assigning symbol x to enum type conflicts with local variable x, please use explicit enum reference y.x or cast(y) x to use local variable"

Now let’s try to use the same syntax for type-inferred struct constructors:

MyStruct s = (1, 2, 3);

Oh look, a comma expression!