[dmd-concurrency] real

Simen Kjaeraas simen.kjaras at gmail.com
Thu Jan 28 16:06:48 PST 2010


Andrei Alexandrescu <andrei at erdani.com> wrote:

> Walter Bright wrote:
> [snip]
>> I've already made the argument for supporting 64 bit atomics where  
>> allowed by the architecture, and the tradeoffs, so I won't repeat it.
>
> I'm a bit lost. Are you saying that we should allow this:
>
> shared int[] a, b;
> ...
> a = b[2 .. 3];
>
> on some machines but not others? How is then anyone expected to write  
> reasonably portable code?
>
> One great thing about Linux distros is that you are able to compile code  
> on your machine. You get the source code, you run configure, you run  
> make, you run make install, and you're good to go. How would it be to  
> see messages like "On this machine this entire feature and consequently  
> design doesn't work"?
>
> I agree with disabling some feature on an odd machine, but not with  
> conditioning entire areas of the language on the machine they work on.  
> What is this, assembly language?
>
>
> Andrei

The reason those Linux distros (and software for them) work that well,
is because someone has sat down and fixed such things. Yes, we'd all
like a compiler that automagically makes everything work fast and safe
without us having to think, but this silver bullet has yet to appear.

I'm absolutely with Walter on this. Make it a hard error on platforms
where it doesn't work, and require programmers to insert code to fix
it. Worst case, people are going to write version( StupidPlatform ) {
  /* kludge */ } else { a = b; }.

-- 
Simen


More information about the dmd-concurrency mailing list