Promise<void> is a funny type.
"Do you promise?"
-"Yes I promise."
"What do you promise?"
-"Nothing!"
"Do you promise?"
-"Yes I promise."
"What do you promise?"
-"Nothing!"
31
32
435
@olafurw Still, I want regular void more than I worry about any weird stories we’ll be able to tell with regular void. Not unlike this one.
1
0
3
@olafurw I am ready and willing to standardize std::atomic<void> here!
2
0
7
@jfbastien @olafurw Gods, no!
I think you could dead-code-eliminate all of it, in fact.
I do have one question: does this assert, or not?
void v = av.load();
assert(av.compare_exchange_strong(v, void()));
This is why we need regular void to appear first.
I think you could dead-code-eliminate all of it, in fact.
I do have one question: does this assert, or not?
void v = av.load();
assert(av.compare_exchange_strong(v, void()));
This is why we need regular void to appear first.
1
0
1
@jfbastien @olafurw You can create an unobservable release sequence.
Sure, you can have a volatile atomic<void>! Why not.
Sure, you can have a volatile atomic<void>! Why not.
1
0
0
@jfbastien @olafurw That's the clarity I seek from regular void.
Particularly, whether the memcmp() of two regular voids needs to return equal or not.
Particularly, whether the memcmp() of two regular voids needs to return equal or not.
2
0
0
@jfbastien @olafurw When you read a void out of this atomic, you will never be able to know which is the prior write you’ve observed in the total order. So anything is still possible.
1
0
2
@__simt__ @jfbastien @olafurw Think of regular void as
struct Void {};
(With default ==, etc)
Do whatever it does.
struct Void {};
(With default ==, etc)
Do whatever it does.
2
0
5
@jfbastien @tvaneerd @__simt__ @olafurw I love boring language constructs that fall out of a clean design. We just hit on a couple of those in Carbon and it was really satisfying.
1
0
5
@chandlerc1024 @tvaneerd @__simt__ @olafurw Oh I don’t disagree on boring being nice in language design! But this is Twitter 😇
1
0
3
Nov 1, 2022 · 7:40 AM UTC
0
0
0




