Why does Go does not have a static race detector? What are the difficulties? (just pointing me to the right docs to read is fine)
I was thinking in a naive high level way... If Rust can do it, using its ownership model, Go could have a tool checking the AST that analyzes variable scopes and checks globals, variables passed to goroutines and to/from channels. If one such followed variable is found in any piece of code to be accessed from more than 2 places and any access is a write, bam! flag that code with an error. What is this not possible or too difficult? too many corner cases? not enough supporting info in the code? (that could be build by the tool) Or maybe is a work in progress,? maybe 100% reliable escape analysis is required beforehand? My question is about tooling, not language changes. Although the goal would be such a win that, if needed, having the compiler generate more info to support this (without changing the specs) would we worth it. -- 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. For more options, visit https://groups.google.com/d/optout.