On Tuesday, 13 September 2016 08:53:39 UTC+3, josvazg wrote:
>
> 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?
>

One WIP http://www.doc.ic.ac.uk/~cn06/pub/2016/dingo/

It's mainly -- *someone has to put in the effort*.

AFAIR the main difficulty lies in buffered channels.

+ Egon

-- 
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.

Reply via email to