www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: standardization of D

reply Dan <murpsoft hotmail.com> writes:
 "Anders F Björklund" <afb algonet.se> wrote in message 
 Yeah, I find that it's kinda funny that we have gone from:

 int main(char[][] args)
 {
     printf("hello world\n");
     return 0;
 }

 in the original D introduction and samples to the current:

 version (Tango)
 import tango.io.Console;
 else // Phobos
 import std.stdio;

 void main()
 {
     version (Tango)
     Cout ("Hello, World!").newline;
     else // Phobos
     writefln("Hello, World!");
 }


Wow! That's god-awful! I just write: int main(){ printf("Hello World!\n"); return 0; } It compiles, for everyone. Those people who use Tango, write their programs only for Tango, they don't version every last fucking call off. That would be retarded - obviously. With libraries, the concept is that you pick one, and compile with it. Job finished. The fact that D has more than one means you *get* to pick one. The fact that D doesn't have tons, means you can reasonably keep both the libraries on your computer in case a program you download uses one or the other. Unless you're going to cry about 30Mb? I can give you $0.15. Going on about how D is unstable and so bad for commercial development because it has two libraries that are both evolving... Oh, and PS: There *IS* a feature freeze at 1.0. D 1.0 code will compile on everyone's post 1.0 compilers. You write for the 1.0 spec, your program will work just as it did when D 1.0 was first released. What's the name of that compiler flag?
Apr 05 2007
next sibling parent reply =?windows-1252?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Dan wrote:

 Wow!  That's god-awful!  I just write:
 
 int main(){ printf("Hello World!\n"); return 0; }
 
 It compiles, for everyone. 

Sure, this has worked for years - no argument there. (besides the missing import for "printf", of course)
 Those people who use Tango, write their programs only for Tango, they don't
version every last fucking call off.  That would be retarded - obviously.
 
 With libraries, the concept is that you pick one, and compile with it.  Job
finished.  

This was just for the discussion, and not literally (even if some libraries do support both at once...) And it was just two calls :-) --anders
Apr 05 2007
parent reply Dan <murpsoft hotmail.com> writes:
Anders F Björklund Wrote:

 Dan wrote:
 
 Wow!  That's god-awful!  I just write:
 
 int main(){ printf("Hello World!\n"); return 0; }
 
 It compiles, for everyone. 

Sure, this has worked for years - no argument there. (besides the missing import for "printf", of course)

I think printf doesn't actually need to be imported. I use it all the time, I think without?
 This was just for the discussion, and not literally
 (even if some libraries do support both at once...)
 
 And it was just two calls :-)
 --anders

True. Sorry, reading my words I came accross harsh. I had a funny smile on my face when I said it. : p You guys were starting to make it sound like D was going monkey business; when it's got a perfectly stable 1.0 and a pair of solid libraries that can be used today and the source for them will be there indefinitely (SVN revision system) The 'new version control system' via SVN is to branch off stable versions, and keep the development version in trunk - unlike the Linux kernel. Arguably, the SVN model is better than the Linux model because the Linux model (freeze, now go, freeze, now go) stifles development, is inflexible, and unnaturally arbitrary. The only advantage I see with the Linux model is it forces you to eliminate all known bugs for each cycle. Just my three cents (inflation, not value added)
Apr 05 2007
parent =?windows-1252?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Dan wrote:

 Sure, this has worked for years - no argument there.
 (besides the missing import for "printf", of course)

I think printf doesn't actually need to be imported. I use it all the time, I think without?

That's a bug ;-) http://www.digitalmars.com/d/archives/digitalmars/D/bugs/5838.html
 And it was just two calls :-)

True. Sorry, reading my words I came accross harsh. I had a funny smile on my face when I said it. : p

Glad to hear that, you did sound a bit upset about something there.
 You guys were starting to make it sound like D was going monkey business; when
it's got a perfectly stable 1.0 and a pair of solid libraries that can be used
today and the source for them will be there indefinitely (SVN revision system)

Actually I wasn't talking about the compiler or library versions. I was thinking about that there are three or four ways to write D programs; as slightly disguised C, with Phobos, with Tango - and this new self-modifying compile-time meta-language D thing that I'm not yet grasping but I'm sure it will be very nice :-) And I didn't mean this was an all *bad* thing, on the contrary. Being a multiparadigm language, I'd pretty much expect as much ? --anders
Apr 05 2007
prev sibling parent Chris Nicholson-Sauls <ibisbasenji gmail.com> writes:
Dan wrote:
 "Anders F Björklund" <afb algonet.se> wrote in message 
 Yeah, I find that it's kinda funny that we have gone from:

 int main(char[][] args)
 {
     printf("hello world\n");
     return 0;
 }

 in the original D introduction and samples to the current:

 version (Tango)
 import tango.io.Console;
 else // Phobos
 import std.stdio;

 void main()
 {
     version (Tango)
     Cout ("Hello, World!").newline;
     else // Phobos
     writefln("Hello, World!");
 }


Wow! That's god-awful! I just write: int main(){ printf("Hello World!\n"); return 0; } It compiles, for everyone. Those people who use Tango, write their programs only for Tango, they don't version every last fucking call off. That would be retarded - obviously.

I can confirm this, for myself anyhow. Although sometimes I do add a line like: version (Tango) {} else { static assert (false, "Tango required."); } To the tops of main modules. Juuuuust in case.
 With libraries, the concept is that you pick one, and compile with it.  Job
finished.  
 
 The fact that D has more than one means you *get* to pick one.
 The fact that D doesn't have tons, means you can reasonably keep both the
libraries on your computer in case a program you download uses one or the
other.  

For one, I'm /glad/ to see two choices. Diversity spawns (hopefully sporting) competition, and competition (usually) breeds innovation. Plus, Phobos and Tango lean toward different programming styles. Phobos is very imperative-paradigm dominated, while Tango makes extensive use of OO-paradigm designs. If someone almost never uses OO programming, then Phobos plus a third-party library or two is a fine way to go. If -- like me -- they tend to use an awful lot of objects, then Tango makes a nice initial framework. There are other such comparisons that can be made.
 Unless you're going to cry about 30Mb?  I can give you $0.15.
 
 Going on about how D is unstable and so bad for commercial development because
it has two libraries that are both evolving...
 
 Oh, and PS: There *IS* a feature freeze at 1.0.
 
 D 1.0 code will compile on everyone's post 1.0 compilers.  You write for the
1.0 spec, your program will work just as it did when D 1.0 was first released. 
What's the name of that compiler flag?

That switch would be '-v1' although I didn't see it anywhere in the on-site documentation. Had to spawn a console and run dmd to check. -- Chris Nicholson-Sauls
Apr 05 2007