Am 14.11.2013 20:54, schrieb deadalnix:
On Thursday, 14 November 2013 at 13:31:30 UTC, Benjamin Thaut wrote:
Am 14.11.2013 11:28, schrieb Walter Bright:

This of course means that functions may wind up going through the
dllimport indirection even for calling functions in the same dll, but it
should work.

Also our suggested approach would not have this downside.

Think about phobos. All of phobos and druntime will be littered with
export attributes. Do you really want all phobos and druntime from
within the same dll to go through dll indirections? And what would
happen when building phobos as static library? With your suggested
behavior (export=dllimport if not specified otherwise) this would mean
that even the phobos static library would have those indirections.

This thread have reached some end.

It has been shown in the beginning that linkers know how to get rid of
the indirection here. If we are going to discuss the same thing again
and again without even doing some experiment for the reality check, then
we can stop right here.

No, linkers can not get of this indirection. Only whole program optimization can, and that won't happen in D (at least dmd) for quite some time. We had exactly that discussion in the old thread about the export attribute. See here: http://forum.dlang.org/thread/[email protected]#post-kvhu2c:242ikq:241:40digitalmars.com

But because Walter does not agree with the way we solved the problem in DIP 45 we have to go through everything again from the beginning. And I'm certenly not going to accept a solution where we rely on some non implemented feature to remove indirections which will most likely not happen in the near future. The same already happend for virtual functions. The documentation states that the compiler might optimize them away, but in pratice this still does not happen, and most likely never will.

With DIP 45 we setteled for additional indirections to achive better usability and I'm ok with that. But what Walter suggests esentially means even more indirections and worse usability. And I'm not ok with that.

I also don't like that we have to go through everything again we already discussed in the old thread, but if Walter doesn't agree it has to be that way. So please try to contribute in a constructive manner, or leave out comments entierly.

Kind Regards
Benjamin Thaut

Reply via email to