Jump to content

  • Log In with Google      Sign In   
  • Create Account


What do you think of the D language?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
93 replies to this topic

#41 Stachel   Members   -  Reputation: 100

Like
0Likes
Like

Posted 03 October 2006 - 08:46 AM

Quote:
Original post by Promit
Quote:
Original post by Stachel
Is it reasonable to assume that Microsoft knows C# better than anyone? So why are Microsoft's major applications not written in C#?

You sure about that? Note that nearly all of the Tablet PC APIs, as well as nearly all of the Windows Media Center programs, are in managed code.

Is Office in C#? Is the C++ compiler? Windows Media Player? Word? Excel? IE7? DirectX? Exchange? JScript? VBScript? FTP client?
Quote:
Massive portions of the new APIs -- WPF (windows presentation foundation, formerly Avalon), WCF (windows communication foundation, formerly Indigo), and the rest of WinFX -- are in managed code. They're such massive managed codebases that they actually got renamed to .NET 3.0, and they're meant to form the core for new applications. WinForms will be deprecated in favor of WPF, for example. SharePoint and SQL Server use .NET heavily. Very nearly all of the Microsoft website, MSN, Live, etc are built in ASP.NET.

I don't doubt it. But "meant to form the core of new applications" with APIs has happened before: remember MFC and COM?
Quote:
Besides, most of MS' really major applications are legacy codebases, some dating back to the late 80s. You don't throw that stuff out and switch over to managed code just for the hell of it; that's retarded. Most of MS' new applications, however, are built in managed code.

True, one should be careful about tossing working legacy, working codebases. I did check the link you provided (thank-you), but given all the code that Microsoft produces, those numbers seem to fall short of a wholesale commitment of core programming to C#. What's at issue here is what is "good enough." For the apps that demand the highest speed, are they being written in C#? Would you write a video codec in C#?
Quote:
While I was working there, I never touched anything other than C#.

Microsoft employs 10,000 programmers (just guessing, + or -). I'm sure there are MS employees who've never worked on anything but VBScript, or javascript, or C++, or you name it. It's a big company.
Quote:
What I see in D is a language that takes C++, and compounds the mistakes made there.

How does C# get it right while D gets it wrong?


Sponsor:

#42 King of Men   Members   -  Reputation: 391

Like
0Likes
Like

Posted 03 October 2006 - 09:23 AM

For that matter, would you write a video codec in C++, or even C? I was under the impression that this is one of the last bastions of hand-coded assembly.

#43 Promit   Moderators   -  Reputation: 6135

Like
0Likes
Like

Posted 03 October 2006 - 11:42 AM

Quote:
Original post by Stachel
Is Office in C#? Is the C++ compiler? Windows Media Player? Word? Excel? IE7? DirectX? Exchange? JScript? VBScript? FTP client?
I already addressed that:
Quote:
Besides, most of MS' really major applications are legacy codebases, some dating back to the late 80s. You don't throw that stuff out and switch over to managed code just for the hell of it; that's retarded.

Exchange 2007, by the way, has managed components.
Quote:

True, one should be careful about tossing working legacy, working codebases. I did check the link you provided (thank-you), but given all the code that Microsoft produces, those numbers seem to fall short of a wholesale commitment of core programming to C#.
You're being deliberately blind. Very nearly all new projects at Microsoft are in managed code. You can't point at old multimillion line codebases and accuse them of being evidence that MS isn't dedicated to C#. That's ludicrous and does nothing except to cheapen this debate. As you point out later in your post, MS is a huge company (much, much more than 10K developers, by the way) and people work in everything.

As for D, I don't particularly feel inclined to move on to more specific complaints about the language. I'll simply refer you to my original remarks on the topic. D is just a fringe movement and that's all it'll ever be.

#44 Stachel   Members   -  Reputation: 100

Like
0Likes
Like

Posted 03 October 2006 - 01:59 PM

Quote:
Original post by Promit
You're being deliberately blind. Very nearly all new projects at Microsoft are in managed code.

Not being inside Microsoft, there's no way I can survey what languages new projects are written in. All I can see it what ships. But I do talk to developers who publicly are big boosters of C# and Java parity with C++, but privately admit the languages have years to go in the performance department.

Quote:
As for D, I don't particularly feel inclined to move on to more specific complaints about the language. I'll simply refer you to my original remarks on the topic. D is just a fringe movement and that's all it'll ever be.


About all you said can be summed up in that D isn't in widespread use. Then you said D compounds C++ mistakes (while presumably C# doesn't). It's reasonable to ask what you mean by that. I'm curious what you see when you look at D.

As for me, I wouldn't use C# for the simple reason that it attaches me at the hip to one platform. What if you write the next big game hit in C#, and want to move it to the new Nintendo/Sony Gee-Whiz game box which has no .net on it? D isn't in widespread use - agreed. But D isn't single platform, it's on several, and being integrated with gcc (GDC) means it's reasonable to get it on any platform I'd need it to be on. That's more important (to me, anyway).



#45 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

0Likes

Posted 03 October 2006 - 03:29 PM

Quote:
You're being deliberately blind. Very nearly all new projects at Microsoft are in managed code. You can't point at old multimillion line codebases and accuse them of being evidence that MS isn't dedicated to C#. That's ludicrous and does nothing except to cheapen this debate. As you point out later in your post, MS is a huge company (much, much more than 10K developers, by the way) and people work in everything.


Wouldn't PInvoke allow them to still use most of the legacy code? Or is that how they are able to do most of the new projects in C#?

If so then why is it any different to using D's abbility to interact with c and c++ code?

#46 Promit   Moderators   -  Reputation: 6135

Like
0Likes
Like

Posted 03 October 2006 - 04:28 PM

Quote:
Original post by Stachel
About all you said can be summed up in that D isn't in widespread use. Then you said D compounds C++ mistakes (while presumably C# doesn't). It's reasonable to ask what you mean by that. I'm curious what you see when you look at D.
I know, and it is reasonable. I just don't feel like going there. It requires too much discussion of what's wrong with C++ first, and I'm not interested in comitting that much time to this thread.
Quote:
As for me, I wouldn't use C# for the simple reason that it attaches me at the hip to one platform. What if you write the next big game hit in C#, and want to move it to the new Nintendo/Sony Gee-Whiz game box which has no .net on it?
That's legitimate.
Quote:
D isn't in widespread use - agreed. But D isn't single platform, it's on several, and being integrated with gcc (GDC) means it's reasonable to get it on any platform I'd need it to be on.
I don't buy that. First of all, if you want D on any platform other than the set that are supported -- which at the moment includes the major desktop and server operating systems, and nothing else. You're not doing any better than C# yet, and you're actually doing substantially worse than Java.

So then you go to retarget GDC to your new platform, let's say the PS3. First of all, that's a tremendous waste of time. Apart from the time spent on implementing the compiler and any supporting runtimes, you have to deal with compiler bugs that arise. Ok, so the frontend shouldn't have any bugs, but you have to rewrite the machine code generation, and that's very likely to be wrong for a while. You'll also have to re-implement the entire backend of the optimization system, or D still won't be usable as a core language. Don't forget, that includes building support for platform intrinsics (Altivec, etc) and making sure the compiler knows how to optimize those too.

Let's suppose you finished all of that. Now you can finally start building your game. Of course you're running many months late at this point, but moving on. Since you're using D for everything, you can't actually license third party middleware now, unless you're willing to write significant glue code. (In the case of a C API, like RenderWare, this might be possible -- in the case of PhysX or Unreal, you're in for a world of hurt.) So now you have to build your own engine completely from scratch. At this point you're looking at a total development timeline which is north of 4-5 years. Whatever console you were planning to launch for is probably obsolete at this point. In order to support the next gen, you have to go back and fix GDC to deal with the new architecture, which is now an 80 core monstrosity...you see where this is going.

Now don't get me wrong, the above story applies almost verbatim to C#, just with Mono instead of GDC. That's exactly why professional development is is not using C#; being locked out of consoles is not acceptable. However, D doesn't really have an advantage in this area, nor does Java or anything other than the native language which the manufacturer is supporting -- which is always C++.

Quote:
Wouldn't PInvoke allow them to still use most of the legacy code? Or is that how they are able to do most of the new projects in C#?
A lot of that code is application level, not library level. PInvoke doesn't really help there. That's not the important part though. You simply don't reimplement code that has been working flawlessly for a decade unless there's a really big problem with the system. There are much better ways of spending developer time.

#47 Stachel   Members   -  Reputation: 100

Like
0Likes
Like

Posted 03 October 2006 - 06:29 PM

Quote:
Original post by Promit
Quote:
D isn't in widespread use - agreed. But D isn't single platform, it's on several, and being integrated with gcc (GDC) means it's reasonable to get it on any platform I'd need it to be on.
I don't buy that. First of all, if you want D on any platform other than the set that are supported -- which at the moment includes the major desktop and server operating systems, and nothing else. You're not doing any better than C# yet,


C# is windows only. DMD is on Windows and Linux, and GDC adds several more to that. D is way ahead of C# on platform support.

Quote:
and you're actually doing substantially worse than Java.

So then you go to retarget GDC to your new platform, let's say the PS3. First of all, that's a tremendous waste of time. Apart from the time spent on implementing the compiler and any supporting runtimes, you have to deal with compiler bugs that arise. Ok, so the frontend shouldn't have any bugs, but you have to rewrite the machine code generation, and that's very likely to be wrong for a while. You'll also have to re-implement the entire backend of the optimization system, or D still won't be usable as a core language. Don't forget, that includes building support for platform intrinsics (Altivec, etc) and making sure the compiler knows how to optimize those too.

Let's suppose you finished all of that. Now you can finally start building your game. Of course you're running many months late at this point, but moving on. Since you're using D for everything, you can't actually license third party middleware now, unless you're willing to write significant glue code. (In the case of a C API, like RenderWare, this might be possible -- in the case of PhysX or Unreal, you're in for a world of hurt.) So now you have to build your own engine completely from scratch. At this point you're looking at a total development timeline which is north of 4-5 years. Whatever console you were planning to launch for is probably obsolete at this point. In order to support the next gen, you have to go back and fix GDC to deal with the new architecture, which is now an 80 core monstrosity...you see where this is going.

Now don't get me wrong, the above story applies almost verbatim to C#, just with Mono instead of GDC. That's exactly why professional development is is not using C#; being locked out of consoles is not acceptable. However, D doesn't really have an advantage in this area, nor does Java or anything other than the native language which the manufacturer is supporting -- which is always C++.

Since D is open source and integrated in to gcc (the gnu D compiler is called GDC), it presumably is fairly straightforward to get it supported on any target that gcc supports, which is quite a lot. I doubt it would be as easy as a recompile, surely there'll be some bugs, tweaks, and adjustments for each platform. But it is feasible, and there are consultants who can be hired to do it. In essence, it's low risk and straightforward to write a check to get it done. You're not dead in the water holding your $5,000,000 bag. You don't need to write a new code generator, or optimizer, etc. If those game consoles are using g++ as their supported C plus plus compiler, then the pieces exist to get GDC working on it.

D can directly access any library that has a C interface. If it has a C plus plus interface, it is only accessible from C plus plus (C# has no C plus plus interface, neither does Java, nor any language other than C plus plus). There is a tool called SWIG that can be used to create C wrappers to C plus plus libraries, this has been used with some success. It isn't necessary to reimplement the library from scratch, unless the game engine API is based on template metaprogramming (!).

There is one C plus plus interface that D does support directly - COM interfaces - for what that's worth.

C# is different. It's closed source. Reimplementing it is just not feasible. Mono is nowhere near being a credible solution.


#48 Conner McCloud   Members   -  Reputation: 1135

Like
0Likes
Like

Posted 03 October 2006 - 07:08 PM

Quote:
Original post by Stachel
Mono is nowhere near being a credible solution.

Oh man, now you've really gone and pissed Promit off.

By the way, I'm not sure if you're aware of this, but generally speaking the correct spelling is C++. I know its easy to get confused, what with + being pronounced plus and all.

CM

#49 Promit   Moderators   -  Reputation: 6135

Like
0Likes
Like

Posted 03 October 2006 - 08:19 PM

Quote:
Original post by Conner McCloud
Quote:
Original post by Stachel
Mono is nowhere near being a credible solution.

Oh man, now you've really gone and pissed Promit off.
It happens. This is just the part where I leave the thread, because the person I'm talking to is an idiot.

#50 Stachel   Members   -  Reputation: 100

Like
0Likes
Like

Posted 03 October 2006 - 09:07 PM

Quote:
Original post by Conner McCloud
By the way, I'm not sure if you're aware of this, but generally speaking the correct spelling is C++. I know its easy to get confused, what with + being pronounced plus and all.


The trouble is, for some reason the pluses don't appear, so it looked like I was writing just plain C with a blank after it in the preview window. I don't know what the problem is with the forum software. I suppose some kind of escape is necessary, but I don't know what it is. So rather than be misunderstood, I wrote it as 'plus'.



#51 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

0Likes

Posted 03 October 2006 - 09:54 PM

Quote:
Original post by Promit
Quote:
Original post by Conner McCloud
Quote:
Original post by Stachel
Mono is nowhere near being a credible solution.

Oh man, now you've really gone and pissed Promit off.
It happens. This is just the part where I leave the thread, because the person I'm talking to is an idiot.

Mono doesn't support Managed DirectX, so it isn't suitable for games. End of story.

#52 MaulingMonkey   Members   -  Reputation: 1556

Like
0Likes
Like

Posted 03 October 2006 - 11:09 PM

Quote:
Original post by Anonymous Poster
Mono doesn't support Managed DirectX, so it isn't suitable for games. End of story.


"PS3 doesn't support DirectX, so it isn't suitable for games. End of story."

Seriously though. Managed DirectX is not your only option. If you don't have your head buried in the sand you'd have heard of The Tao Framework and know it includes bindings to OpenGL, making Mono just as viable a platform for gaming as the PS3 - well, based on that assine metric of "viability" anyways.

Quote:
Mono is nowhere near being a credible solution.


If the chatter in #gamedev is any indicator, it is. Maybe not a credible solution for AAA titles, but I was under the impression that D as a whole was in this same situation. Where's the console support? At least C# has XNA (not that it makes it a "crediable solution", I'm too uninformed to make a statement to that regard - but it'd seem to be at least further along in this regard).

I'll certainly give you that Mono isn't a credible solution if you were planning on depending on the windows specific bits of C# (System.Windows, certain PInvokes, etc). Then again, nothing is, so it's hard to count that against C# as if it were unique in that regard.

#53 Nitage   Members   -  Reputation: 810

Like
0Likes
Like

Posted 03 October 2006 - 11:41 PM

Tao isn't viable for comercial game developement as it doesn't support the XBox

Quote:

making Mono just as viable a platform for gaming as the PS3


Spending time and money porting to PS3 is commercially viable - the same can't be said for porting to Linux.

#54 MaulingMonkey   Members   -  Reputation: 1556

Like
0Likes
Like

Posted 04 October 2006 - 12:05 AM

Quote:
Original post by Nitage
Tao isn't viable for comercial game developement as it doesn't support the XBox



I don't like this circle ~_~. Subsitute "Tao" with "OpenGL" and you'll see you've used a false assumption premises - since, obviously, OpenGL is quite viable for comercial game development, what with being necessary to implement a game on the PS3 and all. Or did I not get a memo detailing the introduction of OpenGL support to the XBox?


To the degree that the Tao isn't well suited for comercial game development, it's due to having no console support whatsoever, leaving little it little advantage over Microsoft's .NET w/ Managed DirectX in terms of multi-platform support. Then again the same can be said of D's OpenGL bindings as well, which is about the entirety of my original point.


I'm not saying Tao + Mono = Prawnage (Because quite frankly the both C# and D fail miseribly when compared to C++ in terms of game platform support). I'm just saying, with MS's .NET, Tao, and Mono, C# arrives at about D's level of "portability". That is, D does not have an advantage here.


EDIT: with respect to game programming at least.

#55 Nitage   Members   -  Reputation: 810

Like
0Likes
Like

Posted 04 October 2006 - 12:25 AM

Quote:

I'm not saying Tao + Mono = Prawnage (Because quite frankly the both C# and D fail miseribly when compared to C++ in terms of game platform support). I'm just saying, with MS's .NET, Tao, and Mono, C# arrives at about D's level of "portability". That is, D does not have an advantage here.


I'm not arguing with your conclusion, only your and Promit's opinion that Mono is a reasonable platform for game developement.

Quote:

I don't like this circle ~_~. Subsitute "Tao" with "OpenGL" and you'll see you've used a false assumption - since, obviously, OpenGL is quite viable for comercial game development, what with being necessary to implement a game on the PS3 and all. Or did I not get a memo detailing the introduction of OpenGL support to the XBox?


Ok then:
Tao isn't viable for comercial game development as it doesn't support the XBox, PS3 or Wii.

The only viable platform supported is Windows - so why not just use DirectX and make the XBox orders or magnitude easier?

Quote:

OpenGL is quite viable for comercial game development, what with being necessary to implement a game on the PS3 and all.


There's the thing. OpenGL is viable because the PS3 is a commerically viable gaming platform. Linux isn't a commerically viable gaming platform so Tao isn't viable.




#56 MaulingMonkey   Members   -  Reputation: 1556

Like
0Likes
Like

Posted 04 October 2006 - 01:06 AM

Quote:
Original post by Nitage
Quote:

I'm not saying Tao + Mono = Prawnage (Because quite frankly the both C# and D fail miseribly when compared to C++ in terms of game platform support). I'm just saying, with MS's .NET, Tao, and Mono, C# arrives at about D's level of "portability". That is, D does not have an advantage here.


I'm not arguing with your conclusion, only your and Promit's opinion that Mono is a reasonable platform for game developement.


It's quite a reasonable platform for prototypes, game concept demos, and non-AAA titles, I believe. In all of these scenarios, lack of console support is hardly fatal. The best solution? Maybe. I'm not familiar with DirectX at all, for example, so using Tao gives me the small benifit of not being forced to get up to speed on another API just yet.

Certainly, if you're unfamiliar with OpenGL or familiar with DirectX, sticking to Microsoft's stuff is probably going to work out better, and the console support is an added bonus (at least in the "to be a commercial title" area) that outweighs those of Tao.

Quote:
Ok then:
Tao isn't viable for comercial game development as it doesn't support the XBox, PS3 or Wii.


Circle circle circle... s/Tao/Winsock2/ => Counterexample.

By the time you hack that statement to include Winsock by naming the major relevant platform it's used on (Windows), the Tao is supported on that list of platform alternatives, even if it isn't the the optimal solution (in most cases) due to there being a generally better alternative.

#57 snk_kid   Members   -  Reputation: 1312

Like
0Likes
Like

Posted 04 October 2006 - 04:20 AM

Quote:
Original post by DeadXorAlive
Especially the people that I think know what they are talking about, such as Sneftel, Promit and snk_kid.


Don't listen to me i'm just crazy [grin], seriously though I'm not that crazy about C# as some maybe. Man some of you guys just don't know what your missing with some of the non mass-majority languages out there, the more languages you try the more painful (and annoying) using mass-majority languages gets.

[Edited by - snk_kid on October 4, 2006 10:20:44 AM]

#58 Promit   Moderators   -  Reputation: 6135

Like
0Likes
Like

Posted 04 October 2006 - 04:36 AM

Quote:
Original post by Promit
Quote:
As for me, I wouldn't use C# for the simple reason that it attaches me at the hip to one platform. What if you write the next big game hit in C#, and want to move it to the new Nintendo/Sony Gee-Whiz game box which has no .net on it?
That's legitimate. [...] Now don't get me wrong, the above story applies almost verbatim to C#, just with Mono instead of GDC. That's exactly why professional development is is not using C#; being locked out of consoles is not acceptable. However, D doesn't really have an advantage in this area, nor does Java or anything other than the native language which the manufacturer is supporting -- which is always C++.
You'd think people would at least read the things I write. But no, instead I'm assigned the opinions people think I'm supposed to have. I never even implied C# was suitable for professional game development. No languages other than C or C++ are, and there's no indication that their momentum will run out any time soon. (What I did imply is that as far as performance goes, C# is comfortably fast enough for professional game development.)

Oh, and Nitage -- everything you've said so far is completely illogical. By your reasoning, if I use DirectX I'm screwed when I need to ship for PS3, which is obviously bogus. C# goes nowhere on the consoles, but it has nothing to do with Tao and everything to do with the lack of a runtime.

#59 Nitage   Members   -  Reputation: 810

Like
0Likes
Like

Posted 04 October 2006 - 04:47 AM

My entire point was that if you are looking for a Game library to use with C# you have 2 choices:

Tao, which supports only one commercially viable platform.
Managed Direct X, which supports two.

So - Mono, which only supports Tao, is unsuitable for commercial game programming.

How can I be clearer?

#60 daerid   Members   -  Reputation: 354

Like
0Likes
Like

Posted 04 October 2006 - 05:03 AM

What 2 platforms does Managed DirectX support? PC and XBOX? By that logic,
Tao can support 2 then: PS3 and PC.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS