Gary Willoughby: "Why Go's design is a disservice to intelligent programmers"

Walter Bright via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sat Mar 28 11:51:53 PDT 2015


On 3/28/2015 8:41 AM, Sönke Ludwig wrote:
> Am 28.03.2015 um 15:33 schrieb Russel Winder via Digitalmars-d-announce:
>> TLS is the evil here. Anyone working with TLS is either writing an
>> operating system or doing it wrong.
>>
>
> As long as we are talking about a closed system that works exclusively on this
> fiber based concurrency model, I completely agree with you (fiber local storage
> would be fine, though).
>
> But we have the "unfortunate" situation that the language is not an isolated
> ecosystem. There are many C libraries that do thread-specific things in one way
> or another, or worse, make use of ordinary global variables without any
> protection against data races, and we simply cannot ignore that.

One solution (that seems entirely reasonable to me) is to make the droutines 
(i.e. "goroutines") pure. Then the TLS problem goes away. Of course, then I/O 
isn't possible either, but perhaps a solution can be found for that.


More information about the Digitalmars-d-announce mailing list