immutable, static, __gshared, TLS, and compile time allocation

Jonathan M Davis jmdavisProg at gmx.com
Fri Apr 20 15:48:08 PDT 2012


On Saturday, April 21, 2012 00:05:01 bearophile wrote:
> Jonathan M Davis:
> > http://d.puremagic.com/issues/show_bug.cgi?id=3934
> > 
> > Whether that'll change or not, I don't know, since it's not
> > clear that Walter considers it to be a problem from what I
> > recall about his comments on discussions on it.
> 
> It's a significant problem because:
> 1) It's a _ridiculous_ situation. Allowing some of those things
> I've reported in bug 3934 is bad PR for D language. The DMD
> compiler looks incredibly sloppy compared to every other language
> compiler/interpreter, including old C compilers. It's about at
> 7.5 Mega KermitFrog sloppiness, that's almost PHP-level sloppy.
> 2) It makes much harder for D newbies to learn what's correct and
> what's not correct. When you are learning something new, you
> really want a strict teacher, otherwise you will have a much
> harder time learning what's correct (I've experimentally seen
> that even the total frienshipping inside D modules makes less
> easy to learn the usage of private/protected tags for new OOP D
> programmers).
> 3) It's confusing even for not newbie programmers, as Manu shows.
> And confusion is bad, error prone, makes people waste time, etc.
> 4) Different D compilers will be sloppy in slightly different
> ways, this means D code will not be portable across different
> compilers.

I tend to agree. There might be situations (particularly with regards to 
generic programming) where some attributes need to be ignored, but in general, 
it's definitely bad. The problem is getting someone to implement the changes 
and get Walter to accept them, since from what I recall, he doesn't really 
view it as a problem.

- Jonathan M Davis


More information about the Digitalmars-d mailing list