My first experience as a D Newbie

Ecstatic Coder ecstatic.coder at gmail.com
Thu Oct 19 08:57:46 UTC 2017


Btw maybe the simplest way to achieve what I suggest would be to 
ask Basil to allow the CoEdit windows installer to optionally 
download and install the D compiler.

This way you download only one setup.exe, and you are ready to 
go...

Just put a big obvious download link button towards this exe on 
D's main landing page and that's it.

I still think that D's main landing page should actually be based 
the content of the Dlang Tour landing page, which is more 
welcoming.

Btw +1 for the simple hello-world example :

import std.stdio;
import std.algorithm;
import std.range;

void main()
{
     // Let's get going!
     writeln("Hello World!");

     // An example for experienced programmers:
     // Take three arrays, and without allocating
     // any new memory, sort across all the
     // arrays inplace
     int[] arr1 = [4, 9, 7];
     int[] arr2 = [5, 2, 1, 10];
     int[] arr3 = [6, 8, 3];
     sort(chain(arr1, arr2, arr3));
     writefln("%s\n%s\n%s\n", arr1, arr2, arr3);
     // To learn more about this example, see the
     // "Range algorithms" page under "Gems"
}

Personally I would have written the last statement with a simple 
writeln :

writeln( arr1, "\n", arr2, "\n", arr3, "\n" );

Longer, less idiomatic, but still a little bit simpler to 
understand than "%s\n%s\%s\n".

The devil is in the detail...



More information about the Digitalmars-d mailing list