Re: Scope of D packages

2015-12-19 Thread Enamex via Digitalmars-d-learn
On Saturday, 19 December 2015 at 00:46:12 UTC, cym13 wrote: To be exact it doesn't need the sources, it needs the function signatures and type definitions so the equivalent of C header files. If you don't want to share the full sources with your library you can generate those header files

Re: Scope of D packages

2015-12-19 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, December 19, 2015 17:09:49 Enamex via Digitalmars-d-learn wrote: > On Saturday, 19 December 2015 at 00:46:12 UTC, cym13 wrote: > > To be exact it doesn't need the sources, it needs the function > > signatures and type definitions so the equivalent of C header > > files. If you don't

Re: Scope of D packages

2015-12-19 Thread Basile B. via Digitalmars-d-learn
On Saturday, 19 December 2015 at 00:46:12 UTC, cym13 wrote: To be exact it doesn't need the sources, it needs the function signatures and type definitions so the equivalent of C header files. If you don't want to share the full sources with your library you can generate those header files

Re: Scope of D packages

2015-12-19 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-12-19 01:52, Jakob Jenkov wrote: But - if the library was open source, it would be better to just share the sources than a compiled file? Yes. The convention is to use the package manager Dub [1]. It only allows source distribution and it handles compiling and all dependencies as

Re: Scope of D packages

2015-12-19 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-12-19 00:20, Jakob Jenkov wrote: I'm coming from Java where "packages" are not that much more than directories. Each class can be exposed or hidden inside a package etc. In Java it is common that an API consists of many packages and subpackages. All classes are simply wrapped up in a

Scope of D packages

2015-12-18 Thread Jakob Jenkov via Digitalmars-d-learn
I'm coming from Java where "packages" are not that much more than directories. Each class can be exposed or hidden inside a package etc. In Java it is common that an API consists of many packages and subpackages. All classes are simply wrapped up in a JAR (Zip) file, and then they can be

Re: Scope of D packages

2015-12-18 Thread Jakob Jenkov via Digitalmars-d-learn
To be exact it doesn't need the sources, it needs the function signatures and type definitions so the equivalent of C header files. If you don't want to share the full sources with your library you can generate those header files automatically using the -H flag in dmd. It will produce a "D

Re: Scope of D packages

2015-12-18 Thread cym13 via Digitalmars-d-learn
On Saturday, 19 December 2015 at 00:52:40 UTC, Jakob Jenkov wrote: To be exact it doesn't need the sources, it needs the function signatures and type definitions so the equivalent of C header files. If you don't want to share the full sources with your library you can generate those header

Re: Scope of D packages

2015-12-18 Thread cym13 via Digitalmars-d-learn
On Saturday, 19 December 2015 at 00:09:16 UTC, Basile B. wrote: On Friday, 18 December 2015 at 23:20:34 UTC, Jakob Jenkov wrote: I'm coming from Java where "packages" are not that much more than directories. Each class can be exposed or hidden inside a package etc. In Java it is common that

Re: Scope of D packages

2015-12-18 Thread Basile B. via Digitalmars-d-learn
On Friday, 18 December 2015 at 23:20:34 UTC, Jakob Jenkov wrote: I'm coming from Java where "packages" are not that much more than directories. Each class can be exposed or hidden inside a package etc. In Java it is common that an API consists of many packages and subpackages. All classes