February 07, 2022
On Friday, 28 January 2022 at 13:07:13 UTC, Mike Parker wrote:
>

my only concern is the capital U, in @mustUse

This seems a little inconsistent with current attributes??

e.g:

nogc
nothrow
inout

https://dlang.org/spec/attribute.html

also, nodiscard would actually seem more logical, given the above as well.

I bet you, people will be thinking nodiscard, but will have to remember to type, @mustuse, only to have the compiler complain, that its' actually @mustUse
February 07, 2022
On Monday, 7 February 2022 at 05:05:27 UTC, forkit wrote:
> my only concern is the capital U, in @mustUse
>
> This seems a little inconsistent with current attributes??
>
> e.g:
>
> nogc
> nothrow
> inout
>
> https://dlang.org/spec/attribute.html
>
> also, nodiscard would actually seem more logical, given the above as well.
>
> I bet you, people will be thinking nodiscard, but will have to remember to type, @mustuse, only to have the compiler complain, that its' actually @mustUse

See my previous replies on this topic:

https://forum.dlang.org/post/xgdwevkxqapljcvyjwtx@forum.dlang.org
https://forum.dlang.org/post/yxoinjtarkuotnlncyqw@forum.dlang.org
February 07, 2022
On Monday, 7 February 2022 at 05:09:23 UTC, Paul Backus wrote:
> On Monday, 7 February 2022 at 05:05:27 UTC, forkit wrote:
>> my only concern is the capital U, in @mustUse
>>
>> This seems a little inconsistent with current attributes??
>>
>> e.g:
>>
>> nogc
>> nothrow
>> inout
>>
>> https://dlang.org/spec/attribute.html
>>
>> also, nodiscard would actually seem more logical, given the above as well.
>>
>> I bet you, people will be thinking nodiscard, but will have to remember to type, @mustuse, only to have the compiler complain, that its' actually @mustUse
>
> See my previous replies on this topic:
>
> https://forum.dlang.org/post/xgdwevkxqapljcvyjwtx@forum.dlang.org
> https://forum.dlang.org/post/yxoinjtarkuotnlncyqw@forum.dlang.org

no amount of replies will change anything ;-)

.. people will still 'think' @nodiscard, but have to 'remember' it's actually @mustuse, but oops.. no... it's @mustUse..

I do not expect anything from my feedback ;-)  .. I'm just saying..humans are humans..

February 07, 2022
On Monday, 7 February 2022 at 05:09:23 UTC, Paul Backus wrote:
> On Monday, 7 February 2022 at 05:05:27 UTC, forkit wrote:
>> my only concern is the capital U, in @mustUse
>>
>> This seems a little inconsistent with current attributes??
>>
>> e.g:
>>
>> nogc
>> nothrow
>> inout
>>
>> https://dlang.org/spec/attribute.html
>>
>> also, nodiscard would actually seem more logical, given the above as well.
>>
>> I bet you, people will be thinking nodiscard, but will have to remember to type, @mustuse, only to have the compiler complain, that its' actually @mustUse
>
> See my previous replies on this topic:
>
> https://forum.dlang.org/post/xgdwevkxqapljcvyjwtx@forum.dlang.org
> https://forum.dlang.org/post/yxoinjtarkuotnlncyqw@forum.dlang.org

This is one of those cases where I think there should be an exception to the "rule" you so blindly want to follow.

@mustuse is so much better and makes code so much more consistent.
February 07, 2022
On Monday, 7 February 2022 at 05:12:39 UTC, forkit wrote:
> no amount of replies will change anything ;-)
>
> .. people will still 'think' @nodiscard, but have to 'remember' it's actually @mustuse, but oops.. no... it's @mustUse..
>
> I do not expect anything from my feedback ;-)  .. I'm just saying..humans are humans..

I've seen similar sentiments expressed many times before, in other contexts. Every time, there are some who insist that the new name will never feel natural to them, and they will never let go of the old name. And every time, history proves them wrong.

The fact is, human brains are quite plastic and adaptable. You'll get used to @mustUse, just like I did, and so will everyone else.
February 07, 2022
On Monday, 7 February 2022 at 13:55:40 UTC, Paul Backus wrote:
>
> I've seen similar sentiments expressed many times before, in other contexts. Every time, there are some who insist that the new name will never feel natural to them, and they will never let go of the old name. And every time, history proves them wrong.
>
> The fact is, human brains are quite plastic and adaptable. You'll get used to @mustUse, just like I did, and so will everyone else.

First, I'm not 'insisting' on anything. I'm just expressing a view.

nodiscard is already used by more programmers that D is likely to ever adopt.

Indeed, it's these programmers that D is trying to adopt.

I'm not sure forcing such people to adapt is necessarily the right approach.

that is my point.

it's not necessary. you making it necessary ;-)

February 07, 2022
On 2/6/2022 7:17 AM, Paul Backus wrote:
> To be honest, though, I can see where he's coming from. When writing DIP 1038, I made a conscious effort to avoid using the term "non-`@nodiscard`", due to the double negative. With a positively-phrased name like `@mustUse`, that problem disappears.

Andrei once asked me for scientific evidence that negations are cognitively more difficult for human brains to understand. I didn't have it at the time, but did eventually find it and forwarded it to Andrei, who was satisfied with it. I didn't keep a copy, though.

It's not just my opinion that negations are to be avoided, there's research justifying it.

I remember back in the olden daze when I was designing digital logic circuits that using NAND and NOR gates would cause me endless confusion. I eventually decided to design with AND and OR gates, then mechanically convert them to NAND and NOR using deMorgan's Theorem.

NANDs and NORs require fewer transistors to function, so are preferred.

This was later built into the ABEL programming language that I designed for Data I/O. ABEL was used to burn logic equations into programmable logic devices. It had a pass that converted everything to NANDs and NORs.

Positive logic in computer code, however, has no such penalty. Hence I try to write code that eschews negative logic.

Anytime you find yourself writing not-nohow, not-noway, etc., it's time to redesign the state of the variables. Try to organize logic so ! is not necessary. I mean, try to organize logic so ! is absent.
February 07, 2022
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.

February 08, 2022
On Monday, 7 February 2022 at 23:38:11 UTC, Walter Bright wrote:
>
> Andrei once asked me for scientific evidence that negations are cognitively more difficult for human brains to understand. I didn't have it at the time, but did eventually find it and forwarded it to Andrei, who was satisfied with it. I didn't keep a copy, though.
>
> It's not just my opinion that negations are to be avoided, there's research justifying it.
> ..

I certainly don't discount such research.

However, I expect there is also research that says something different ;-)

Also, I expect you're talking about linguistics, and not programming languages. Truths may hold in one, and not other.

Regardless, the research I am familiar with, tells me that we are psychologically biased towards cognitive schemas that we already hold.

Changing ones cognitive schemas is not effortless, and, since D is very much focused on attracting programmers from the C++ world, the existing schemas those users hold should always be factored into ones thinking when implementing change in D.

February 08, 2022
On Monday, 7 February 2022 at 23:38:11 UTC, Walter Bright wrote:
>
> Anytime you find yourself writing not-nohow, not-noway, etc., it's time to redesign the state of the variables. Try to organize logic so ! is not necessary. I mean, try to organize logic so ! is absent.

But sometimes that requires too much effort ;-)

e.g.

!debug { do this }

My brain decided this form of logic without me really thinking at all.

Now I have to 'rethink', in order to find the correct form of that logic that doesn't require the use of !

nodiscard is better than mustuse for the same reason.

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.