On Sunday, November 2, 2025 at 10:42:50 PM UTC Will Faught wrote:

Looks interesting! Is there an article somewhere that explains why each 
change to Go was necessary for DST? For example, why are sticky channel 
values required for DST? 


Hi Will,

Thanks! They aren't. Both are just things I wished for. :) Thanks for 
asking. I may add a note to clarify that.
 

Couldn’t sticky values be simulated with a goroutine that owns sending on a 
channel that implements the sticky/unsticky/clear behavior? 


I'm not sure what you are thinking of with a goroutine somehow "owning" a 
channel...?

I certainly have been thinking about how to do ownership, since it is 
clear that Go could benefit from Pony/Rust like ownership
checking to prevent data races, and having an "owner" type that the runtime 
could 
change and check would be an obvious approach. But I'm not sure how... let
me know if you have ideas.

I did try to do "closing values" (in https://github.com/glycerine/loquet) 
without 
hacking on the runtime, but I got to many races. You
really do want the broadcast value to come "over the channel", not 
alongside it.
 

Isn’t it possible in general to arrange to not close a channel more than 
once?


Of course -- I wrote https://github.com/glycerine/idem to do that in 2017. 

My feeling was it should not need to be that heavy weight.  

Any time you see a huge number of workarounds (all
of the sync package facilities, cannot substitute for condition variables, 
integrates 
poorly with wait groups and condition variables), it should be a sign that 
your design 
primitives are not strong or orthogonal enough-- you are only rally 
covering a sub-space
(in the linear algebra sense) of the actual need-space.

Cheers,
Jason
 


On Oct 30, 2025, at 12:48 AM, Jason E. Aten wrote:

If you ever wished for 

+ better Deterministic Simulation Testing (DST) support, or 

+ that channels could replace Condition Variables, or for

+ a sync.WaitGroup alternative that could be interrupted by a timeout, or 
that

+ channel close could be idempotent and broadcast a non-zero value,

then I invite you to experiment with my superset-of-Go experiment, Pont.

https://github.com/glycerine/pont

Feedback welcome -- post an issue on the repo.

Jason

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/golang-nuts/9d26d464-e322-4220-925a-1e933bbfe812n%40googlegroups.com.

Reply via email to