Revamped concurrency API
Bartosz Milewski
bartosz-nospam at relisoft.com
Tue Oct 13 15:26:04 PDT 2009
Nick B Wrote:
> Nick B wrote:
> > Andrei Alexandrescu wrote:
> >> bearophile wrote:
> >>> Andrei Alexandrescu:
> >>>
> >>>> Unfortunately, Bartosz has declined to contribute.<
> >>>
> >>> I have read a good amount of his interesting blog posts, he has shown
> >>> me many things I didn't know about. And he was very happy about the
> >>> idea of helping D concurrency. Do you know why he has changed his
> >>> mind regarding this? Maybe because Walter has refused the
> >>> uniqueness/lend ideas?
> >>
> >> You may want to email Bartosz and ask him.
> >>
> >> Andrei
> >
> > I will ask him, via his blog, and then will post the link.
> >
> > Nick B.
>
> here it is.
>
> http://bartoszmilewski.wordpress.com/2009/09/22/ownership-systems-against-data-races/#comment-922
>
> Nick B.
It's good to know that my ideas are still circulating in the D community. Thanks, guys!
Since I'm now put on the spot, I have to explain my recent detachment from D.
I didn't so much "decline to contribute" as hit a wall. I'm a bit of a perfectionist and it's hard for me to subscribe to the "good enough" philosophy (as long as it's better that C++, it's fine for D). My impression is that, as the release of D2 and the publication of Andrei's book are nearing, this attitude is gaining ground. I try to fight this attitude but it's an uphill battle. Or, as Andrei puts it, I start whining and give up ;-).
Particular issues that bother me are:
The semantics of "shared." I can live with postponing the implementation of the race-free type system, but not with the compiler inserting barriers around all shared reads and writes, even inside synchronized sections.
The C++-derived template metaprogramming mess. Especially when C++0x provides better support for variadic templates than D (see my upcoming blog). I fought successfully for non-functional approach to string mixins. The same is needed for more general templates. In my opinion, there should not be any part of the language that is understandable only by seasoned library writers.
The "better than Java" aspect of D ignores the latest development in Java. In particular the work on non-null pointers and the use of annotations for type-system extensions. Annotations are being added to D as we speak because it finally became obvious that no amount of cleverness can make object properties work without additional syntax. So the patching begins, without a clear vision of the role of annotation in future D.
As far as my thread work went, I had an almost working implementation of spawn, except for a nasty compiler bug which resisted all efforts to reduce it to a simple test case. Threads also required some clever work with templates (testing arguments to "spawn" for sharing violations). I implemented typelist.d in Phobos to make it easier, and learned how inflexible D templates were. At least they are better than C++, or are they?
More information about the Digitalmars-d
mailing list