<div class="gmail_quote">On 11 April 2012 13:50, Jonathan M Davis <span dir="ltr"><<a href="mailto:jmdavisProg@gmx.com">jmdavisProg@gmx.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Wednesday, April 11, 2012 11:56:00 deadalnix wrote:<br>
> Le 10/04/2012 19:44, Jonathan M Davis a écrit :<br>
> > On Tuesday, April 10, 2012 19:36:06 deadalnix wrote:<br>
> >> On this newsgroup with Jonathan M Davis, we started discussing export.<br>
> >> As it was off topic, and as it was interesting, I wish to bring it here.<br>
> >><br>
> >> As most of you know, all symbol on posix systems are export, but not on<br>
> >> windows. As D have an export keyword, the question is what to do with it.<br>
> >><br>
> >> The need for change in the UNIX world of this behavior exists, and some<br>
> >> move has been made in direction of explicitly hiding symbols ( see<br>
> >> <a href="http://gcc.gnu.org/wiki/Visibility" target="_blank">http://gcc.gnu.org/wiki/Visibility</a> ).<br>
> ><br>
> > As I said in the other thread, I _hate_ export. It's one of Windows<br>
> > largest<br>
> > misfeatures IMHO. It drives me nuts when I have to deal with it in C++.<br>
> > The<br>
> > fact that Linux exports everything is _fantastic_. It's so much easier to<br>
> > deal with. I'd _hate_ to see Linux or anything we do move in the<br>
> > direction of what Windows has done.<br>
> ><br>
> > - Jonathan M Davis<br>
><br>
> It isn't a misfeature. The link explain why it is interesting :<br>
>   - It improves load time of DSO.<br>
>   - Allow more optimizations.<br>
>   - Reduce DSO size by 5% to 20% for C++. Considering how long mangling<br>
> are in D, probably more for us.<br>
>   - Reduce name collision (this one poorly apply to D, because the<br>
> module system handle that quite nicely).<br>
><br>
> Additionally, it allow automatic finalization for non exported methods in D.<br>
><br>
> The drawback is having to explicitely export. I think it worth it,<br>
> especially considering « export: » is an available solution. A compiler<br>
> switch is also an option.<br>
><br>
> BTW, Linux is moving in that direction, for the advantages given above.<br>
> Some other posix systems also does that already.<br>
<br>
</div></div>Honestly, I don't care what list of benefits you can come up with for having to<br>
explicitly export symbols. I am sick and tired of having to deal with build<br>
breakages due to unexported symbols in C++ on Windows. It is really, reallly,<br>
really annoying. It's a usability nightmare as far as I'm concerned, and I<br>
don't want to see it spread any more than I want to see cancer spread.<br>
<br>
As far as I'm concerned, Linux got this _right_ and Windows got it completely<br>
wrong, and I do _not_ want to see export being used in D any further than it<br>
is. It's bad enough that the export keyword exists at all.<br></blockquote><div><br></div><div>Apply the same rules to Linux, and it'll never bother you again. It's the only solution, you can't possibly influence Microsoft to apply the inverse.</div>
<div>As far as I'm concerned windows got it _right_ and linux got it... 'linux'. I like DLL's being self contained modules with tightly controlled interfaces. And deadalnix lists important points.</div></div>