Talk:D (programming language)

This is an old revision of this page, as edited by SeeSchloss (talk | contribs) at 08:39, 2 July 2004 (more D-specific example ?). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

"(This needs elaboration.)" has just turned into a link, the target of which has only one sentence of relevance, which says practically nothing.

OK, so it gives a lower bound for the number of languages that have been called D, but that's certainly nowhere near an adequate elaboration in my mind.

Maybe someone should start D programming language (disambiguation)....

-- Smjg 09:44, 20 Apr 2004 (UTC)


Wouldn't it be slightly better to use a D-specific statement in the example like foreach instead of for ?

The problem is that it won't have exactly the same output as the current example (you can't print the number of the argument unless you add an i variable somewhere and increment it each time, but that doesn't look very clean) :

Example

// D program to print 'hello world' followed by its command line arguments
int main(char[][] args)
{
   printf("hello world\n");
   foreach (char[] arg ; args)
       printf("%.*s\n", arg);
   return 0;
}