• Welcome to Valhalla Legends Archive.
 

D Programming Language

Started by Mephisto, June 17, 2005, 02:02 AM

Previous topic - Next topic

Mephisto

I heard people talking about D and I Googled it.  Apparantly it's an improved version of C++ (obviously from the name).  My question is that is it really worth using?  Is it used on the corporate/business level as C++ is?  Do gaming and software development companies use it over C++ now?  etc.

hierholzer

Here are some differences between them what they have/ dont have..

http://www.digitalmars.com/d/

Mephisto

Already read that.  That's where I originally discovered the D language.

Yegg


Yoni

My opinion:

1. Don't use it now. Its only compiler (Digital Mars D compiler) is in Alpha and it's still under development. Nothing else supports it and there are no libraries for it.

2. The language looks awesome. It is definitely something to look forward to, as a great replacement (no less!) for C and C++!

R.a.B.B.i.T


LivedKrad

Seems a bit out of my scope, I'll stick with learning C# for now.

R.a.B.B.i.T


shout

They are getting rid of namespaces??? Why???

This seems kinda ewwy, but I will have to wait until there is something before I can judge it.

Yegg

Maybe they have a better replacement for namespaces. I can't imagine what it would be though...

R.a.B.B.i.T



tA-Kane

There are a number of things in the D language that I do not like. I'll list the two which I can remember below. The D language *does* look pretty cool with them aside, however. Please feel free to correct me if you think I'm understanding these statements wrong.

Quotehttp://www.digitalmars.com/d/function.html#nested
There is no inline keyword. The compiler makes the decision whether to inline a function or not
So you cannot specifically specify a specific (whoa... lotta specific, heh!) function to be inlined and instead have to hope that the compiler inlines it? Can you say... eww?

Quotehttp://www.digitalmars.com/d/class.html
The D compiler is free to rearrange the order of fields in a class to optimally pack them in an implementation-defined manner.
That's not right, in my opinion. At the very least, there should be an option to turn that off... otherwise, so much for writing an extensible class which directly reads or writes data to or from the network or your hard drive which is compatible with other (and possibly even already-existing) protocols.

Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com

Yoni

#13
Quote from: tA-Kane on June 24, 2005, 02:57 AM
Quotehttp://www.digitalmars.com/d/function.html#nested
There is no inline keyword. The compiler makes the decision whether to inline a function or not
So you cannot specifically specify a specific (whoa... lotta specific, heh!) function to be inlined and instead have to hope that the compiler inlines it? Can you say... eww?
I don't agree. Name a situation where you would want to inline a function that the optimizer wouldn't have inlined automatically.
NOTE: Assume the optimizer is smarter than you.

Quote from: tA-Kane on June 24, 2005, 02:57 AM
Quotehttp://www.digitalmars.com/d/class.html
The D compiler is free to rearrange the order of fields in a class to optimally pack them in an implementation-defined manner.
That's not right, in my opinion. At the very least, there should be an option to turn that off... otherwise, so much for writing an extensible class which directly reads or writes data to or from the network or your hard drive which is compatible with other (and possibly even already-existing) protocols.
That refers to classes. The way I understood it, unlike C++, D treats classes and structs very differently. You would use a struct for what you said, not a class, and write C-style functions which accept struct pointers. That is the "systems programming" way to do it; object-oriented programming is much higher level and there is no cross-language way to implement it, currently. (Specifically, C++ classes are already implementation-defined, just like D's are! For example, every compiler implements multiple inheritence differently.)

Edit: As it says later in the same paragraph:
QuoteExplicit control of field layout is provided by struct/union types, not classes.

tA-Kane

Quote from: Yoni on June 24, 2005, 09:52 AM
Quote from: tA-Kane on June 24, 2005, 02:57 AM
Quotehttp://www.digitalmars.com/d/function.html#nested
There is no inline keyword. The compiler makes the decision whether to inline a function or not
So you cannot specifically specify a specific (whoa... lotta specific, heh!) function to be inlined and instead have to hope that the compiler inlines it? Can you say... eww?
I don't agree. Name a situation where you would want to inline a function that the optimizer wouldn't have inlined automatically.
NOTE: Assume the optimizer is smarter than you.
Without actually extensively testing the D compiler (which I really do not have time for, currently) I cannot provide an example. But I really dislike the idea of not allowing the programmer to specify certain functions to be inlined.
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com