July 22, 2021

On Thursday, 22 July 2021 at 07:42:33 UTC, Patrick Schluter wrote:

>

https://run.dlang.io/is/a12yVL

The compiler will already do the right thing as it cannot convert the enum A and enum B to the type of x.

Sorry for the massive disapointment but it can : https://run.dlang.io/is/ktKQPT.

July 22, 2021
On 7/21/2021 11:12 PM, zjh wrote:
> As a `plain user`, I hope to have the same convenience as `C++`.
> I know you are very professional. But, the development of `the D language`,Don't you need a lot of `primary users`?
> IMO, As a language leader, You should provide users with a variety of choices like `C++`.
> When users feel great, they will naturally let their friends to use `D`.
> `C++'s` advantage is although It don't do well, but It provide you basic facilities.
> `D`,the biggest weakness is ecology. Ecology is made up of users. A large number of users may not be as professional as you.
> So I think `d` should work hard on `small details` to gain users.
> I've been saying that the biggest advantage of D is `better c++`, which can attract `C++ programmers`.
> `C++ programmer`, can help `D` in two places, one is to bring the user, the other is to bring the library which brings the user.
> Therefore, D should pay more attention to the experience of the `C++ man`, rather than the average force, resulting in nothing.

One of D's goals is to not have C++ features that cause more problems than they are worth. Of course, this is a judgement call and people have different opinions about it.

It's also pretty clear that every feature C++ has, good or bad, has its adherents and champions.

July 22, 2021
On 7/21/2021 11:28 PM, rikki cattermole wrote:
> If you can't describe it using words, use code instead.

I tried everything, including that. I really cannot explain it. It was a very frustrating experience.
July 22, 2021

On Thursday, 22 July 2021 at 07:49:23 UTC, Basile B. wrote:

>

On Thursday, 22 July 2021 at 07:42:33 UTC, Patrick Schluter wrote:

>

https://run.dlang.io/is/a12yVL

The compiler will already do the right thing as it cannot convert the enum A and enum B to the type of x.

Sorry for the massive disapointment but it can : https://run.dlang.io/is/ktKQPT.

Sometimes i think the main problem with D is all these weird corner cases pop up and people dont say oh look we need to fix this, nail it down, make it consistent, they say or look cool a new feature!

Not directed at you fwiw.

July 22, 2021

On Thursday, 22 July 2021 at 07:49:23 UTC, Basile B. wrote:

>

On Thursday, 22 July 2021 at 07:42:33 UTC, Patrick Schluter wrote:

>

https://run.dlang.io/is/a12yVL

The compiler will already do the right thing as it cannot convert the enum A and enum B to the type of x.

Sorry for the massive disapointment but it can : https://run.dlang.io/is/ktKQPT.

-	enum ENUM { A, B, C }
+	enum ENUM : ubyte { A, B, C }

You should have put your change also on the forum so that everyone can see.

Yes, that's indeed a problem but IMHO it's a bug due to int promotion rule.

July 22, 2021

On Thursday, 22 July 2021 at 08:41:55 UTC, Patrick Schluter wrote:

>

On Thursday, 22 July 2021 at 07:49:23 UTC, Basile B. wrote:

Yes, that's indeed a problem but IMHO it's a bug due to int promotion rule.

Its not a bug it's a feature!

July 22, 2021

On Thursday, 22 July 2021 at 08:41:55 UTC, Patrick Schluter wrote:

>

On Thursday, 22 July 2021 at 07:49:23 UTC, Basile B. wrote:

>

On Thursday, 22 July 2021 at 07:42:33 UTC, Patrick Schluter wrote:

>

https://run.dlang.io/is/a12yVL

The compiler will already do the right thing as it cannot convert the enum A and enum B to the type of x.

Sorry for the massive disapointment but it can : https://run.dlang.io/is/ktKQPT.

-	enum ENUM { A, B, C }
+	enum ENUM : ubyte { A, B, C }

You should have put your change also on the forum so that everyone can see.

Yes, that's indeed a problem but IMHO it's a bug due to int promotion rule.

Yes it is definitively a bug, I know it already but I could not resist to recall to the community that it exists, as your example matched perfectly.

sorry ;)

July 22, 2021

On Thursday, 22 July 2021 at 08:51:12 UTC, Basile B. wrote:

>

On Thursday, 22 July 2021 at 08:41:55 UTC, Patrick Schluter wrote:

>

On Thursday, 22 July 2021 at 07:49:23 UTC, Basile B. wrote:

>

On Thursday, 22 July 2021 at 07:42:33 UTC, Patrick Schluter wrote:

>

[...]

Sorry for the massive disapointment but it can : https://run.dlang.io/is/ktKQPT.

-	enum ENUM { A, B, C }
+	enum ENUM : ubyte { A, B, C }

You should have put your change also on the forum so that everyone can see.

Yes, that's indeed a problem but IMHO it's a bug due to int promotion rule.

Yes it is definitively a bug, I know it already but I could not resist to recall to the community that it exists, as your example matched perfectly.

sorry ;)

Don't be sorry when what you say is true. :-)

July 22, 2021

On Thursday, 22 July 2021 at 08:51:12 UTC, Basile B. wrote:

>

On Thursday, 22 July 2021 at 08:41:55 UTC, Patrick Schluter

>

Yes, that's indeed a problem but IMHO it's a bug due to int promotion rule.

Yes it is definitively a bug, I know it already but I could not resist to recall to the community that it exists, as your example matched perfectly.

sorry ;)

bugzilla:

https://issues.dlang.org/show_bug.cgi?id=6226
https://issues.dlang.org/show_bug.cgi?id=21460

July 22, 2021
On 22/07/2021 8:37 PM, Walter Bright wrote:
> On 7/21/2021 11:28 PM, rikki cattermole wrote:
>> If you can't describe it using words, use code instead.
> 
> I tried everything, including that. I really cannot explain it. It was a very frustrating experience.

Oh hmm. I just went looking for it, the only files regarding semantic analysis I thought it could be in yup... 700 LOC method. Found that rather quickly.

That really isn't a good sign I must admit!