Learning D

Mike Parker via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Aug 27 08:57:55 PDT 2014


On 8/27/2014 10:25 PM, Ryan wrote:

>
>
> DSSS, XfBuild, Bud, RDMD, or premake4.  Especially DSSS vs DUB. Is DUB a
> replacement for DSSS?

You can look at it that way. It's both a package manager and build tool. 
DSSS was abandoned long ago. Why not other tools -- XfBuild is no longer 
maintained (AFAIK); Bud is long, long dead; RDMD is a build tool, but 
not a package manager. D support in existing C/C++ has been spotty in 
the past, though they may be up to date now -- but again, those are 
build tools and not package managers. The community has standardized 
around dub. You don't have to use it if you don't want to, but it will 
make your life easier if you do. In will eventually be bundled with DMD 
and will be the defacto build tool and package manager.

>
> I also don't understand why there are multiple code repositories and
> where to find what (http://code.dlang.org vs
> http://www.dsource.org/projects/).  I understand that Open Source is
> decentralized, but when you're talking about a relatively small user
> group like D it seems very confusing.

code.dlang.org is not a code repository, but a package registry. The 
code for each project is hosted either at github or BitBucket. The 
registry is where dub looks to find the dependencies you list in your 
dub.json file. If the package is listed in the registry, it will then 
follow the registered link to pull the source from github or BitBucket. 
You don't need to look there yourself unless you want to see what has 
been registered and what has been recently updated. You can also create 
your own locations for dub to search for packages, including locally. 
code.dlang.org is the default.

dsource.org is dead, dead, dead. The guy with the keys no longer 
maintains it. Look through the newsgroup archives here and you can find 
a couple of recent discussions about it. Most (all?) of the projects 
that are still active have moved on github or BitBucket long ago. The 
rest are abandoned.

>
> Last, I've been in the Java/C# world so long that I don't understand why
> I need to provide the source code to statically link a *.lib file.  I
> started exploring dynamic link libraries, and this too seems very
> confusing to me.  Perhaps there is a better way to do this?  Perhaps I
> just don't understand it well enough yet?

You don't need the source of a library to link with it, but to compile 
any modules that use it. During the compile step, the compiler needs to 
know which symbols are available and visible to the modules it is 
compiling, much like a C compiler needs the headers. This isn't 
necessary in a language like Java as all the information the compiler 
needs is available in the bytecode of the class files. The object file 
formats used by C/C++/D do not contain that information.

You can also use a stripped down version of the source, a .di file, 
which functions like a C header. These can be created manually or by 
passing the -H option to DMD (I'm unfamiliar with LDC or GDC options) 
during compilation.


>
> Next on my list is to attempt to create a Glade hello world in D.
>
> Can I host a tutorial here on dlang.org?  If so does it belong under
> "How-tos" or "Articles"?
>
>
>
>


---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com



More information about the Digitalmars-d-learn mailing list