November 13, 2018
On 11/13/2018 3:50 PM, Isaac S. wrote:
> is asinine and ignorant.

Some friendly advice - nobody is going to pay serious attention to articles that sum up with such unprofessional statements. Continuing the practice will just result in the moderators removing them.

November 14, 2018
On Wednesday, 14 November 2018 at 03:02:48 UTC, Walter Bright wrote:
> On 11/13/2018 3:50 PM, Isaac S. wrote:
>> is asinine and ignorant.
>
> Some friendly advice - nobody is going to pay serious attention to articles that sum up with such unprofessional statements. Continuing the practice will just result in the moderators removing them.

I'm sorry that it is unkind but I came to D because I found it to be an extremely well-designed language. Seeing something like 10560 be declared as "correct" is really disheartening because it's _obviously_ a design flaw (and should thus be fixed).

Regardless of my unprofessional attitude (I do apologize; I normally try to be professional but something like this is really irritating): why should an enum not convert to its declared type, rather than blindly using its literal value. Just using the literal value discards the secondary-type information the programmer had given it.
November 14, 2018
On Wednesday, 14 November 2018 at 03:02:48 UTC, Walter Bright wrote:
> On 11/13/2018 3:50 PM, Isaac S. wrote:
>> is asinine and ignorant.
>
> Some friendly advice - nobody is going to pay serious attention to articles that sum up with such unprofessional statements. Continuing the practice will just result in the moderators removing them.

I read the first adjective as a statement of opinion about your reasoning for rejection and the second about the way you have dismissed the opinions of others, neither of which are uncalled for and certainly not unprofessional.

You would do well to think about that before you post further.
November 13, 2018
On Tuesday, November 13, 2018 8:47:01 PM MST Nicholas Wilson via Digitalmars-d-announce wrote:
> On Wednesday, 14 November 2018 at 03:02:48 UTC, Walter Bright
>
> wrote:
> > On 11/13/2018 3:50 PM, Isaac S. wrote:
> >> is asinine and ignorant.
> >
> > Some friendly advice - nobody is going to pay serious attention to articles that sum up with such unprofessional statements. Continuing the practice will just result in the moderators removing them.
>
> I read the first adjective as a statement of opinion about your reasoning for rejection and the second about the way you have dismissed the opinions of others, neither of which are uncalled for and certainly not unprofessional.
>
> You would do well to think about that before you post further.

Given how strong the negative response is to this and how incomprenhensible a number of us find the reasoning behind how bool functions in some scenarios, Walter probably does need to sit back and think about this, but using words like asinine is pretty much always uncalled for in a professional discussion. I can very much understand Isaac's frustration, but making statements like that really is the sort of thing that comes across as attacking the poster and is going to tend to result in folks not listening to your arguments anymore, even if they're well-reasoned and logical. It's already hard enough to convince people when your arguments are solid without getting anything into the mix that could come across as insulting.

- Jonathan M Davis



November 13, 2018
On 11/13/2018 7:12 PM, Isaac S. wrote:
> why should an enum not convert to its declared type, rather than blindly using its literal value. Just using the literal value discards the secondary-type information the programmer had given it.

D has the following match levels:

1. exact
2. conversion to const
3. implicit conversion
4. no match

C++, on the other hand, has a long list of match levels, which nobody remembers, and yet still causes problems (see Scott Meyers). The conversion of `A` to `int` already drops it to match level 3, from which it will not rise. I.e. the second level being an exact match with `int` does not help.

The further disambiguation between multiple matching functions is done using partial ordering. This has NOTHING to do with the arguments. It just looks at:

   f(int)
   f(short)

and picks f(short) because it is more specialized. This partial ordering is what C++ does with template functions. It is simpler and more robust than the older more primitive "match level" system C++ uses for non-template functions. I suspect that if C++ were to do a "do-over" with function overloading, it would use partial ordering instead of match levels.

Interestingly, the match level and partial ordering methods almost always produce the same results.

There have been various attempts over the years to "fix" various things in the D matching system by adding "just one more" match level. I've rejected all of them, because things that look simple and obvious with trivial examples tend to sink in a swamp with the dirty reality of the rather vast number of types and conversions that D supports. This happens in C++, and what people tend to do is just throw up their hands and hackishly add in more overloads until they get the result they want.
November 14, 2018
On Wednesday, 14 November 2018 at 04:24:20 UTC, Jonathan M Davis wrote:
> Given how strong the negative response is to this and how incomprenhensible a number of us find the reasoning behind how bool functions in some scenarios, Walter probably does need to sit back and think about this, but using words like asinine is pretty much always uncalled for in a professional discussion. I can very much understand Isaac's frustration, but making statements like that really is the sort of thing that comes across as attacking the poster and is going to tend to result in folks not listening to your arguments anymore, even if they're well-reasoned and logical. It's already hard enough to convince people when your arguments are solid without getting anything into the mix that could come across as insulting.
>
> - Jonathan M Davis

asinine, adjective: extremely stupid or foolish. Is there some additional connotation I am missing on this living (comparatively) in the middle of nowhere? (Genuine question.)
November 14, 2018
On Wednesday, 14 November 2018 at 04:27:05 UTC, Walter Bright wrote:
> There have been various attempts over the years to "fix" various things in the D matching system by adding "just one more" match level. I've rejected all of them, because things that look simple and obvious with trivial examples tend to sink in a swamp with the dirty reality of the rather vast number of types and conversions that D supports. This happens in C++, and what people tend to do is just throw up their hands and hackishly add in more overloads until they get the result they want.

The thing is, this isn't a new match level. Rather than the enum implicitly casting to its literal (I'm hoping I'm using the correct word here) I'm proposing it implicitly cast to its typed literal (Instead of A.a implicitly converting to 0, it converts to int(0)). This would mean it would match the int since its a direct match.
November 14, 2018
On Wednesday, 14 November 2018 at 04:27:29 UTC, Nicholas Wilson wrote:
> asinine, adjective: extremely stupid or foolish. Is there some additional connotation I am missing on this living (comparatively) in the middle of nowhere? (Genuine question.)

It probably depends on where someone is from (asinine isn't considered a big insult where I live [rural US]).

Regardless of that, I will admit I did overstep (especially in calling Walter ignorant) and so I do apologize to Walter (I'm sorry that sounds in-sincere, I don't know how to properly apologize in text-form).
November 14, 2018
On Wednesday, 14 November 2018 at 04:33:23 UTC, Isaac S. wrote:
> On Wednesday, 14 November 2018 at 04:27:05 UTC, Walter Bright wrote:
>> There have been various attempts over the years to "fix" various things in the D matching system by adding "just one more" match level. I've rejected all of them, because things that look simple and obvious with trivial examples tend to sink in a swamp with the dirty reality of the rather vast number of types and conversions that D supports. This happens in C++, and what people tend to do is just throw up their hands and hackishly add in more overloads until they get the result they want.
>
> The thing is, this isn't a new match level. Rather than the enum implicitly casting to its literal (I'm hoping I'm using the correct word here) I'm proposing it implicitly cast to its typed literal (Instead of A.a implicitly converting to 0, it converts to int(0)). This would mean it would match the int since its a direct match.

The water is already somewhat murky here, the magic enums `__c_long` & friends already do some of this, but array of them don't (which I'm going to fix in https://github.com/dlang/dmd/pull/8950 as its needed to make __c_wchar_t actually useful). Extending this to all enums would probably do the trick.

> enum implicitly casting to its literal

memory type is what the compiler calls it.

November 13, 2018
On Tuesday, November 13, 2018 9:27:29 PM MST Nicholas Wilson via Digitalmars-d-announce wrote:
> On Wednesday, 14 November 2018 at 04:24:20 UTC, Jonathan M Davis
>
> wrote:
> > Given how strong the negative response is to this and how incomprenhensible a number of us find the reasoning behind how bool functions in some scenarios, Walter probably does need to sit back and think about this, but using words like asinine is pretty much always uncalled for in a professional discussion. I can very much understand Isaac's frustration, but making statements like that really is the sort of thing that comes across as attacking the poster and is going to tend to result in folks not listening to your arguments anymore, even if they're well-reasoned and logical. It's already hard enough to convince people when your arguments are solid without getting anything into the mix that could come across as insulting.
> >
> > - Jonathan M Davis
>
> asinine, adjective: extremely stupid or foolish. Is there some
> additional connotation I am missing on this living
> (comparatively) in the middle of nowhere? (Genuine question.)

Not AFAIK, but calling someone or something extremely stupid or foolish is almost always a terrible idea in a professional discussion (or pretty much any discussion that you want to be civil) - especially if it can be interpreted as calling the person stupid or foolish. That's just throwing insults around. If an idea or decision is bad, then it should be shown as to why it's bad, and if it is indeed a terrible idea, then the arguments themselves should make that obvious without needing to throw insults around.

It's not always easy to avoid calling ideas stupid when you get emotional about something, but the stronger the language used, the more likely it is that you're going to get a strong emotional response out of the other person rather than a logical, reasoned discussion that can come to a useful conclusion rather than a flame war, and asinine is a pretty strong word. It's the sort of word that's going to tend to get people mad and insulted rather than help with a logical argument in any way - which is why Walter called in unprofessional.

- Jonathan M Davis