January 18, 2013
Am Fri, 18 Jan 2013 01:07:05 +0000 (UTC)
schrieb Justin Whear <justin@economicmodeling.com>:

> 
> You can use "extern(D)" or simply "extern";  this is described here: http://dlang.org/attribute.html#linkage
> 
> Justin

BTW: I wonder how export should be used? It seems like it currently does nothing (because we only use static linking?).

If we ever wanted to ship phobos as a DLL, wouldn't we have to mark all functions in phobos as export?

NOTE: Shared libraries on POSIX traditionally export all their members by default. There are some people trying to change that as exporting all members can cause performance problems:

http://gcc.gnu.org/wiki/Visibility http://software.intel.com/en-us/blogs/2010/11/10/limit-performance-impact-of-global-symbols-on-linux http://www.technovelty.org/code/why-symbol-visibility-is-good.html

So we might consider if we want to hide members in shared objects by default.
January 18, 2013
On Friday, 18 January 2013 at 04:46:46 UTC, Andrej Mitrovic wrote:
> On 1/18/13, Rob T <alanb@ucora.com> wrote:
>> however I read somewhere that it pretty much does nothing but
>> strip out the comments because it needs the full source code for
>> a inlining, CTFE, and templates.
>
> There was a recent pull that implemented better header generation
> (https://github.com/D-Programming-Language/dmd/pull/1487), it will be
> in the 2.062 release (which might be a long time from now but it's
> worth knowing). It's probably doing a better job at hiding
> implementation details.

That pull will make things better, but it doesn't go far enough. For example it would be nice to have extra control, such as the option of telling the compiler to leave out templates and warn or error if auto returns are discovered (or better, convert the auto into a known type).

The idea for some people is to hide as much implementation details as possible, so the compiler should be made to help do that kind of job. Also users may want to leave out templates in some cases. As it is, we have to hack them out manually, but that is a time waster and error prone.

I wonder if the UDA concept can be used to mark things so that they get left out of the DI or included in the DI?

Ultimately the module system itself should be given another shake, I find that it is too simplistic. It would be far better if the module system had true interfacing constructs so that the programmer can specify what gets placed into the DI.

--rt
1 2
Next ›   Last »