Just starting out

Jesse Phillips jessekphillips+d at gmail.com
Wed Oct 12 22:29:57 PDT 2011


On Wed, 12 Oct 2011 16:43:41 -0700, J Arrizza wrote:

> Hi,
> 
> I'm just starting out in D, read the book, tried a Hello World, and
> wrote a few unit tests. I'm ready for the next step.

Great, hello 2.7? I hear it adds a --version option.

> I'd like to begin writing some more complex D code which I want to use
> not only as a test bed to investigate D itself to a deeper level but if
> it's successful to eventually use it as the beginnings of a toolkit for
> our internal use.

Personally I've used it internally for scripting, especially when needing 
to verify things. Its nice to use a compiled language for this, as you 
don't need an interpreter to use it and it isn't crap (batch).

I created a cmdln library to help with user interaction, which some seem 
to like.

https://github.com/he-the-great/JPDLibs/tree/cmdln

 
> I'm looking for some recommendations from folks with lots of experience
> in D:
> 
> 1) Which to use: Phobos, Tango, or Tangobos? It makes sense for us to
> use D2 so this seems to preclude Tango for now. Correct?

Well since you probably read TDPL, you'll likely find D1 restrictive, 
which eliminates Tango and Tangobos.

D2 will still require some maintenance as the compiler is updated. And 
sometimes in bigger chunks than others. There is a little better 
information on what will happen, but still not perfect so you'll have to 
keep an eye out.

www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel#StandardLibraryDevelopment
 
> Are there plans to merge or standardize on one of these? Phobos and
> Tango seem to be incompatible with each other at this point.

Someone started a port of Tango for D2, it completely done and I don't 
know how well the two would work together, but at least there shouldn't 
be an need to pull out the runtime.
 
> My worry here is if we choose the wrong underlying library we end up
> having to re-write a lot of code later on.

As said, D2 will require some maintenance as you update the compiler. 
Depending on what you need the library selection can be slimmer than D1, 
but it can also be better. A needed library is more likely to get created 
for D2 than D1. I chose D2.
 
> 2) Which compiler? DMD, GDC or something else?  We use Ubuntu 10.04, 64
> bit as our development platform. I'm assuming the gc is in all the D
> compilers.

I use dmd, it is pretty easy to install. But GDC is making headway to get 
into GCC, so that is damn awesome. My understanding is GDC is just as 
Usable a DMD.
 
> 3) DDT (eclipse plugin) seems relatively green. Any other suggestions
> for an IDE. Not a big deal for us, but it's nice to have source
> formatting. The DDT folks indicated that that feature is a long way off
> for them.

Derelict is not maintained anymore, but it was fairly feature rich. 
VisualD sounds really nice. Personally I use Vim.

> 
> Thanks,
> John Hi,

Important things I think one should understand are

* Ranges: These guy's are a major part of Phobos and are so nice to work 
with and create.

* Templates: D makes these so easy to use/create and understand. While 
not required they appear in documentation and are part of things like 
operator overloading.

* Template Constraints: Since you'll be calling a templated function, 
you'll want to understand the error message when it complains the 
template cannot be instantiated.

* Don't design around a cool feature: There are things I would stay away 
from while the community works some things out. Stick with what you know 
and slowly test the waters. I would avoid std.concurrency in my design 
since I don't really know how to and it hasn't had a good trial by those 
that do (or maybe it has and I don't know about).


More information about the Digitalmars-d mailing list