February 07, 2022
On 2/7/2022 5:10 PM, forkit wrote:
> Suppose I don't want to 'use it'. That should be allowed, as long as I don't discard it. With mustuse, I'm being told I can't discard it, and that i must use it.

Sorry, all those negations made my brain explode.

P.S. English has examples of negation issues, such as:

"I could care less."

which makes no sense at all, until you realize it's just a shortened version of "I couldn't care less." The addition or subtraction of the negation does not change the meaning, as the brain doesn't do a good job recognizing it.

The phrases "not no-way", and "not no-how" use multiple negations to emphasize, rather than negate.

February 07, 2022
On 2/6/2022 7:14 AM, Daniel N wrote:
> However by choosing "use" we could avoid the entire discussion about which case to use...

"mustuse" is much more greppable.
February 08, 2022
On Tuesday, 8 February 2022 at 01:25:52 UTC, Walter Bright wrote:
>
> Sorry, all those negations made my brain explode.
>
> P.S. English has examples of negation issues, such as:
>
> "I could care less."
>
> which makes no sense at all, until you realize it's just a shortened version of "I couldn't care less." The addition or subtraction of the negation does not change the meaning, as the brain doesn't do a good job recognizing it.
>
> The phrases "not no-way", and "not no-how" use multiple negations to emphasize, rather than negate.

I often say to my cat 'what are you doing' .. but what i really mean is 'don't do that'.

by avoiding negation, I'm probably just confusing my cat as to what i really meant.

mustuse -> I must use it? Why must i use it? How must I use it? What happens if
i don't use it.

nodiscard -> don't discard it. nice and simple (just like 'don't do that').

February 08, 2022
On Tuesday, 8 February 2022 at 01:40:38 UTC, forkit wrote:
>
> I often say to my cat 'what are you doing' .. but what i really mean is 'don't do that'.
>
> by avoiding negation, I'm probably just confusing my cat as to what i really meant.
>
> mustuse -> I must use it? Why must i use it? How must I use it? What happens if
> i don't use it.
>
> nodiscard -> don't discard it. nice and simple (just like 'don't do that').

I guess the question really is:

What it the most important concept you are relaying to the programmer by the use of that term?

That they 'must use it'.

Or, that they 'cannot discard it'.

They seem like two different concepts to me.

I don't believe that using nodiscard in C++, means you must use it.

If in D, it means you must use it, then 'mustuse' makes more sense.

If not, then stick with what people already know, is my advice.


February 08, 2022
On Monday, 7 February 2022 at 23:40:38 UTC, Walter Bright wrote:
> On 2/6/2022 9:05 PM, forkit wrote:
>> only to have the compiler complain, that its' actually @mustUse
>
> I have to agree. All D keywords and imports and compiler-recognized attributes are lower case, @mustuse should be consistent with that.

I guess core.attribute.gnuAbiTag sneaked in behind your back, huh?

Anyway, I'm happy to change it if that's your call, although it would have been nice to have caught this before the DIP was officially accepted.
February 08, 2022
On Tuesday, 8 February 2022 at 01:53:17 UTC, forkit wrote:
>

also, the use of the word 'must' in any programming language, needs careful consideration.

'mustuse' has the potential to invite mass 'mustuse' demonstrations!

'nodiscard' suggests somewhat more 'autonomy', and would achieve a more-or-less similiar outcome.


February 08, 2022
On Tuesday, 8 February 2022 at 02:21:37 UTC, Paul Backus wrote:
>
> I guess core.attribute.gnuAbiTag sneaked in behind your back, huh?
>
> Anyway, I'm happy to change it if that's your call, although it would have been nice to have caught this before the DIP was officially accepted.

actually, I wish camelCase was not a requirement of user defined attributes.

I would prefer @must_use over @mustUse, for example (althouhgh i prefer @mustuse to both of these, since the underscore is not really needed in this case).


Don't be discouraged though, the proposal is sound. But ideas that might help it become more acceptable to programmers (and the langauge), is still not worthy of being excluded from discussion (I think I got enough negations in there ;-)
February 07, 2022
On 2/7/2022 6:21 PM, Paul Backus wrote:
> On Monday, 7 February 2022 at 23:40:38 UTC, Walter Bright wrote:
>> On 2/6/2022 9:05 PM, forkit wrote:
>>> only to have the compiler complain, that its' actually @mustUse
>>
>> I have to agree. All D keywords and imports and compiler-recognized attributes are lower case, @mustuse should be consistent with that.
> 
> I guess core.attribute.gnuAbiTag sneaked in behind your back, huh?

Indeed it did. I did not notice it until this moment. A lot of people work on D, and I have to trust them.


> Anyway, I'm happy to change it if that's your call, although it would have been nice to have caught this before the DIP was officially accepted.

Yes, please change it. Thank you!
February 08, 2022
On Tuesday, 8 February 2022 at 02:57:29 UTC, forkit wrote:
>
> I would prefer @must_use over @mustUse, for example (althouhgh i prefer @mustuse to both of these, since the underscore is not really needed in this case).
>

my argument for the above, is:

The problem with using camelCase on @attributes, is that it implies nothing special about it (the attribute), at all.

It is common practice to use camelCase for things like variables, function names, etc... i.e. things that hold something, or do something.

Whereas an @attribute is essentially a predicate.

You are proclaiming a static declaration, that will apply to what follows.

As such, it deserves to stand out, with a different naming convention.

That is: all @lowercase, but when required, @snake_case.

February 08, 2022
On Tuesday, 8 February 2022 at 01:53:17 UTC, forkit wrote:
> On Tuesday, 8 February 2022 at 01:40:38 UTC, forkit wrote:
>>
> If in D, it means you must use it, then 'mustuse' makes more sense.
>
> If not, then stick with what people already know, is my advice.

Probably @noignore would be a better name. You're not really trying to dictate what people do with the result, just that they dont ignore it.