On Wednesday, 9 February 2022 at 17:54:17 UTC, rikki cattermole
wrote:
On 10/02/2022 5:21 AM, Paul Backus wrote:
- C (gcc/clang): __attribute__((warn_unused_result))
C23 will also have [[nodiscard]]
Not only will it have that on functions, but also support a
string too.
Unfortunately its
On Wednesday, 9 February 2022 at 17:40:31 UTC, jmh530 wrote:
On Wednesday, 9 February 2022 at 16:21:24 UTC, Paul Backus
wrote:
[snip]
In D, there is no existing word for this, so from that
perspective both "mustuse" and "nodiscard" are equally valid.
In other languages, there are multiple
On Wednesday, 9 February 2022 at 17:48:29 UTC, Guillaume Piolat
wrote:
There is also the Nim "discard" statement.
Just change the default to not allowing return values to be
discarded. When you really want to, do:
```
cast(void) function_with_return_value(…)
```
Or something like that.
On Wednesday, 9 February 2022 at 16:21:24 UTC, Paul Backus wrote:
On Wednesday, 9 February 2022 at 14:30:30 UTC, Guillaume Piolat
wrote:
On Monday, 7 February 2022 at 19:57:28 UTC, forkit wrote:
First, I'm not 'insisting' on anything. I'm just expressing a
view.
nodiscard is already used by
On 10/02/2022 5:21 AM, Paul Backus wrote:
- C (gcc/clang): __attribute__((warn_unused_result))
C23 will also have [[nodiscard]]
Not only will it have that on functions, but also support a string too.
Unfortunately its looking like we have chosen to diverge from C, and
therefore won't be
On Wednesday, 9 February 2022 at 16:21:24 UTC, Paul Backus wrote:
C++ is quite popular, but it is not the only popular language,
and there are many D programmers who have never used C++ at
all, let alone C++17 or later. Therefore, it is a mistake to
assume that all or even most D programmers
On Wednesday, 9 February 2022 at 16:21:24 UTC, Paul Backus wrote:
[snip]
In D, there is no existing word for this, so from that
perspective both "mustuse" and "nodiscard" are equally valid.
In other languages, there are multiple existing words:
- C++17: [[nodiscard]]
- C (gcc/clang):
On Wednesday, 9 February 2022 at 14:30:30 UTC, Guillaume Piolat
wrote:
On Monday, 7 February 2022 at 19:57:28 UTC, forkit wrote:
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
On Wednesday, 9 February 2022 at 14:30:30 UTC, Guillaume Piolat
wrote:
Hence some does of of reusing,
some dose of reuse*
On Monday, 7 February 2022 at 19:57:28 UTC, forkit wrote:
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
On Wednesday, 9 February 2022 at 10:59:03 UTC, Dukc wrote:
You're implying that your opinion is rational and apolitical,
disagreeing with it is irrational politics.
I am implying that there are many symptoms of people not being
willing to champion the best possible design and instead have
On Sunday, 6 February 2022 at 15:43:39 UTC, Ola Fosheim Grøstad
wrote:
3. *The politics of language improvements*: I don't think this
should be a library type. I think this feature is too important
for that. To me this smells of let's move the syntax to a
library to avoid any discussion about
On Tuesday, 8 February 2022 at 21:28:06 UTC, claptrap wrote:
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.
I'd like to see an option to annotate such an attribute.
Something like this:
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
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
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
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
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
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
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
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
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.
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,
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
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
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.
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.
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,
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
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
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
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
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
On Sunday, 6 February 2022 at 20:52:21 UTC, Paul Backus wrote:
If you intended to direct your messages at "the community" in
general, rather than at me specifically, you should have
started a new thread. As is, with these messages buried several
pages deep in a thread about a different topic,
On Sunday, 6 February 2022 at 20:45:20 UTC, Ola Fosheim Grøstad
wrote:
On Sunday, 6 February 2022 at 19:14:50 UTC, Paul Backus wrote:
Let me rephrase: I do not understand why you feel the need to
direct these messages at me, personally.
I am sorry if you felt I was addressing you personally.
On Sunday, 6 February 2022 at 19:14:50 UTC, Paul Backus wrote:
Let me rephrase: I do not understand why you feel the need to
direct these messages at me, personally.
I am sorry if you felt I was addressing you personally. That was
not intended, maybe bad phrasing on my part. (I tend to send
On Sunday, 6 February 2022 at 17:07:46 UTC, Ola Fosheim Grøstad
wrote:
On Sunday, 6 February 2022 at 16:20:07 UTC, Paul Backus wrote:
I did not reply (and do not intend to reply) to any of the
numerous other statements you have made in your other replies
to this thread, since they are
On Sunday, 6 February 2022 at 16:20:07 UTC, Paul Backus wrote:
I did not reply (and do not intend to reply) to any of the
numerous other statements you have made in your other replies
to this thread, since they are statements about the design of
the D language and the DIP process in general,
On Sunday, 6 February 2022 at 16:01:15 UTC, Ola Fosheim Grøstad
wrote:
On Sunday, 6 February 2022 at 15:51:46 UTC, Paul Backus wrote:
If you're still confused *after* you've read the
documentation, feel free to come back and complain to me then.
What I stated has nothing to do with
On Sunday, 6 February 2022 at 15:51:46 UTC, Paul Backus wrote:
If you're still confused *after* you've read the documentation,
feel free to come back and complain to me then.
What I stated has nothing to do with documentation. I think the
semantics are too important to be a "linter-feature".
On Sunday, 6 February 2022 at 15:17:35 UTC, 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
On Sunday, 6 February 2022 at 15:46:47 UTC, Ola Fosheim Grøstad
wrote:
On Sunday, 6 February 2022 at 15:17:35 UTC, Paul Backus wrote:
On Sunday, 6 February 2022 at 14:44:40 UTC, Ola Fosheim
Grøstad wrote:
It is kinda confusing to call it a user-defined attribute if
it is recognized by the
On Sunday, 6 February 2022 at 15:17:35 UTC, Paul Backus wrote:
On Sunday, 6 February 2022 at 14:44:40 UTC, Ola Fosheim Grøstad
wrote:
On Sunday, 6 February 2022 at 13:33:53 UTC, Paul Backus wrote:
@mustUse is a user-defined attribute, and the official style
guide says that names of UDAs
On Sunday, 6 February 2022 at 14:56:42 UTC, Paul Backus wrote:
If you strongly prefer the lower-case version, you can always
rename it in your own code:
import core.attribute: mustuse = mustUse;
This response is getting a bit longwinded, and I really want this
feature, but…
1.
On Sunday, 6 February 2022 at 15:24:17 UTC, Paolo Invernizzi
wrote:
@hold (or @held) ? donwannaopenacanofworms ... my last post
really :-P
Pretend that you are a beginning D programmer, and you come
across one of the following declarations while reading someone
else's code:
@use struct
On Sunday, 6 February 2022 at 15:17:35 UTC, Paul Backus wrote:
On Sunday, 6 February 2022 at 14:44:40 UTC, Ola Fosheim Grøstad
wrote:
On Sunday, 6 February 2022 at 13:33:53 UTC, Paul Backus wrote:
@mustUse is a user-defined attribute, and the official style
guide says that names of UDAs
On Sunday, 6 February 2022 at 14:44:40 UTC, Ola Fosheim Grøstad
wrote:
On Sunday, 6 February 2022 at 13:33:53 UTC, Paul Backus wrote:
@mustUse is a user-defined attribute, and the official style
guide says that names of UDAs should be camelCased:
It is kinda confusing to call it a
On Sunday, 6 February 2022 at 13:33:53 UTC, Paul Backus wrote:
On Sunday, 6 February 2022 at 10:55:20 UTC, Daniel N wrote:
Guess I'm way too late, I just find it very strange you
settled on mixedCase, it's not used for anything else.
(nothrow @nogc). I also don't agree with the motivation
On Sunday, 6 February 2022 at 14:56:42 UTC, Paul Backus wrote:
On Sunday, 6 February 2022 at 14:32:31 UTC, Paolo Invernizzi
wrote:
While I like a lot and welcome the addition of this attribute
(so thank you!), I humbly ask to reconsider using the full
lowercase alternative instead of camel
On Sunday, 6 February 2022 at 14:32:31 UTC, Paolo Invernizzi
wrote:
While I like a lot and welcome the addition of this attribute
(so thank you!), I humbly ask to reconsider using the full
lowercase alternative instead of camel case.
Let's conform with the other built-in attributes listed
On Sunday, 6 February 2022 at 13:33:53 UTC, Paul Backus wrote:
On Sunday, 6 February 2022 at 10:55:20 UTC, Daniel N wrote:
Guess I'm way too late, I just find it very strange you
settled on mixedCase, it's not used for anything else.
(nothrow @nogc). I also don't agree with the motivation
On Sunday, 6 February 2022 at 14:00:15 UTC, Paul Backus wrote:
On Sunday, 6 February 2022 at 13:40:00 UTC, Paolo Invernizzi
wrote:
On Sunday, 6 February 2022 at 13:33:53 UTC, Paul Backus wrote:
@mustUse is a user-defined attribute, and the official style
guide says that names of UDAs should
On Sunday, 6 February 2022 at 13:40:00 UTC, Paolo Invernizzi
wrote:
On Sunday, 6 February 2022 at 13:33:53 UTC, Paul Backus wrote:
@mustUse is a user-defined attribute, and the official style
guide says that names of UDAs should be camelCased:
https://dlang.org/dstyle.html#naming_udas
...
On Sunday, 6 February 2022 at 13:33:53 UTC, Paul Backus wrote:
On Sunday, 6 February 2022 at 10:55:20 UTC, Daniel N wrote:
Guess I'm way too late, I just find it very strange you
settled on mixedCase, it's not used for anything else.
(nothrow @nogc). I also don't agree with the motivation
On Sunday, 6 February 2022 at 10:55:20 UTC, Daniel N wrote:
Guess I'm way too late, I just find it very strange you settled
on mixedCase, it's not used for anything else. (nothrow @nogc).
I also don't agree with the motivation that @use is hard to
search for because @ is an unusual symbol.
On Thursday, 3 February 2022 at 17:25:16 UTC, Paul Backus wrote:
On Friday, 28 January 2022 at 13:07:13 UTC, Mike Parker wrote:
Congratulations to Paul Backus. DIP 1038, "@mustUse" has been
accepted after he implemented changes to address concerns from
Walter.
On Friday, 28 January 2022 at 13:07:13 UTC, Mike Parker wrote:
Congratulations to Paul Backus. DIP 1038, "@mustUse" has been
accepted after he implemented changes to address concerns from
Walter.
https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1038.md
Update for anyone following
On Wednesday, 2 February 2022 at 22:58:39 UTC, Mike Parker wrote:
No, that wasn’t the reason for the delay. Delays in the DIP
process always come down to someone waiting for a response from
someone else. Everyone involved has multiple priorities, so
when the next move comes down to any one
On Wednesday, 2 February 2022 at 21:23:16 UTC, Dukc wrote:
So this explains why the DIP lingered so long in formal
assessment. I think the reason for the delay is good in itself,
but it would have been better to update us a bit more on why
the assessment is taking so long. From the outside
On Friday, 28 January 2022 at 13:07:13 UTC, Mike Parker wrote:
I want to reiterate that the above is only a summary. Paul and
Walter exchanged multiple emails in discussion of these issues,
with both proposing ideas to solve them. Paul does an excellent
job describing his rationale for only
Well done Paul. I appreciate the clarity, simplicity and utility.
On Friday, 28 January 2022 at 13:07:13 UTC, Mike Parker wrote:
Congratulations to Paul Backus. DIP 1038, "@mustUse" has been
accepted after he implemented changes to address concerns from
Walter.
https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1038.md
...
Congratulations! (And
Congratulations to Paul Backus. DIP 1038, "@mustUse" has been
accepted after he implemented changes to address concerns from
Walter.
https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1038.md
During the Formal Assessment, Walter and Paul discussed a few
aspects of the original
63 matches
Mail list logo