Talk:D (programming language)

This is an old revision of this page, as edited by 213.13.241.31 (talk) at 14:52, 29 August 2004 (The article reads like an advertisement for D). 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)

D allows foreach loops to be indexed, so there's no problem at all. -- Smjg 22:36, 3 Jul 2004 (UTC)
OK, I don't know D well enough :) and what do you think of my proposition then ? → SeeSchloß 20:44, 5 Jul 2004 (UTC)
Yes, we should put this in. A good code example is one that does things in the way of the language. -- Smjg 09:45, 6 Jul 2004 (UTC)
Thanks, I've replaced the for example with the foreach one. By the way it looks like the new release now has writef() and writefln(), which could give writefln ("args[", i, "] = ", arg); instead of the printf in the example, but I haven't used it yet. → SeeSchloß 21:30, 10 Jul 2004 (UTC)

Example

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

The article reads like an advertisement for D

I need to learn more before I can rework it, but for starters, "archaic features" is not NPOV. --Ardonik 00:43, Jul 16, 2004 (UTC)

yes, the article ends up being an advertisement for D instead of an impartial explanation of what it is, it's history and it's capabilities. Maybe it has something to do with D being still under development and some purveyors of that language being quite active in the astroturfing department.
A complete impartial re-write of this article is needed.