The memory model is very important when writing lock free concurrent structures 
- especially cross platform. 

It “worked” because the behavior was what most people would expect but I 
suspect there were lots of good around making it work and verifying when 
porting to different architectures. 

> On Oct 10, 2024, at 11:27 AM, Ian Lance Taylor <i...@golang.org> wrote:
> 
> On Wed, Oct 9, 2024 at 11:30 PM will....@gmail.com
> <will.fau...@gmail.com> wrote:
>> 
>> It seems required to understand how Go programs work.
>> 
>> If the memory model was never written, or is omitted from an implementation, 
>> would the concurrency features still be reliable and useful?
> 
> People were able to write concurrent Go code successfully for years
> before the memory model was written.  As it says right at the start of
> the memory model reference: "If you must read the rest of this
> document to understand the behavior of your program, you are being too
> clever."  Yes, you do have to understand channels and mutexes in order
> to write concurrent code, but they are reasonably simple to understand
> and to use correctly.  In fact, I think people understand and use them
> correctly without ever reading or understanding the details of the
> memory model.
> 
> I'm glad that we do have a memory model, but I really don't think it's
> necessary reading for the most Go programmers.  The spec, on the other
> hand, is intended to be readable and useful for all Go programmers.
> 
> Ian
> 
> --
> 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 golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/CAOyqgcVTGx9qGNxagXvBQKPGCxSM7dw7jThHGK4Z7vkD48Q0GQ%40mail.gmail.com.

-- 
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 golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/3D96D6B9-4E72-4636-B3FF-152EF789AC1D%40ix.netcom.com.

Reply via email to