On Wednesday, 26 July 2017 22:16:50 UTC+2, Ian Lance Taylor wrote:
>
> On Wed, Jul 26, 2017 at 1:07 PM, Florin Pățan <flori...@gmail.com 
> <javascript:>> wrote: 
> > 
> > I would like to understand a bit better one particular implementation 
> > decision regarding the new sync.Map feature. 
> >  [ ... ]
>
> Adding a new complex feature to the language is a high bar.  sync.Map 
> is a somewhat special purpose data structure.  We don't want to add 
> all potentially useful data structures to the language.  Especially 
> not if they can be implemented entirely as a library, even if the 
> resulting library does lose some compile-time type safety. 
>
> With all due respect, I think the sync and context packages are so closely 
coupled to the multitasking nature of Go as to be inseparable from it. I 
understand and really appreciate that decisions such as the above could not 
have been made as  wisely in the early days as is the case now, but I think 
Ian's defence of these decisions is unnecessary and misguided.

I sincerely hope that Go2 will take a page or two from Per Brinch Hansen 
and Edsgar J. Dijkstra and add data protection in the core language. I'm no 
language theoretician and I'm willing to be corrected, but it seems to me 
that applying synchronisation features by default, as well as context 
properties (the former to data structures and the latter to functions) 
could be balanced by code analysis equal or analogous to present day race 
detection to eliminate the unwanted synchronisation baggage at translation 
time.

Rob Pike's wish to keep compilation times down would inevitably suffer, but 
the language's "precision" would gain much. That said, I would not be the 
one to do the work, so I appreciate that such recommendations may be a bit 
out of place.

Good luck to Go2, no matter which direction it takes. I do believe that Go 
has done some very good path finding, Go2 will certainly deserve to be an 
even bigger success.

Lucio.

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