digitalmars.D - the 3rd great war - D Vs C#
- the Poor Novice One (4/4) Jul 23 2004 Goodday Fellows!
- Matthew (12/16) Jul 23 2004 D compiles to host, and can thus avoid installation problems, and VM lat...
- Gold Dragon (4/6) Jul 24 2004 I don't know about compilers (how to make them but I do know how they
- J C Calvarese (7/17) Jul 24 2004 It's more the garbage collector than anything else. In C++, there's no
- pragma (46/50) Jul 23 2004 (If anyone feels that I'm off base with this, please feel free to critiq...
- Ben Hinkle (11/15) Jul 23 2004 1) D is Rocky. C# is Mr T.
- Phill (4/7) Jul 23 2004 What do you mean by a kitchen sink?
- Jarrett Billingsley (2/3) Jul 23 2004 i think he's referring to "everything but the kitchen sink" i.e. extra c...
- Ben Hinkle (6/16) Jul 23 2004 http://www.goenglish.com/EverythingButTheKitchenSink.asp
- Phill (7/23) Jul 23 2004 and
- Helmut Leitner (15/18) Jul 23 2004 (1) D is in the spirit of C: high performance and a small footprint
- Deja Augustine (6/12) Jul 23 2004 I would simply like to add that if the code gods smile upon me, D will
- the Poor Novice (2/14) Jul 23 2004 Success and Happiness to you , mr.Deja !
- J C Calvarese (6/23) Jul 23 2004 Sounds like fun. Would it have access to the many, many .NET libraries
- Deja Augustine (2/26) Jul 23 2004 Of course.
- Niko Korhonen (45/45) Aug 06 2004 This is a little late reply for this thread (does anyone even read the
- Juanjo =?ISO-8859-15?Q?=C1lvarez?= (10/20) Aug 06 2004 writefln(toString(x), ": ", obj.toString());
- Niko Korhonen (27/31) Aug 06 2004 Yes, this is a recently added feature in D and I like it. However, it's
- Nick (7/15) Aug 06 2004 I think it should be safe to assume that the programmer knows the defini...
- Lord Syl (5/23) Aug 06 2004 Another reason that has not been stated is that C# is a interpreted lang...
- kinghajj (6/10) Aug 06 2004 Yeah, C# is interpreted, but yet I haven't seen Microsoft make .NET for ...
- Berin Loritsch (6/22) Aug 06 2004 The marketing machine for MS never leaves MS systems. What they claim
- Sean Kelly (13/19) Aug 06 2004 By the way, last I heard MS *was* working on .NET for Linux. But the po...
- Matthew (2/21) Aug 07 2004 Just out of interest, what're your criticisms of COM?
- Sean Kelly (11/12) Aug 07 2004 Frankly, I haven't used it enough to offer a truly informed answer. COM...
- Berin Loritsch (9/14) Aug 06 2004 Actually, that's a misnomer. The way the .NET stuff runs is that the
- Sean Kelly (6/10) Aug 06 2004 C# isn't actually interpreted. It's just that .NET applications typical...
- Andy Friesen (7/19) Aug 06 2004 The really ironic thing is that a company with less influence could have...
- Trejkaz Xaoza (29/33) Aug 21 2004 That's oversimplifying .NET a little too much.
- Berin Loritsch (2/21) Aug 06 2004 Even then, you never *really* know until you read the source code....
Goodday Fellows! Please don't mention the DMD and Wiki comparisons of D with other languages.I just want to know the personal views of the this great community on this topic.
Jul 23 2004
D compiles to host, and can thus avoid installation problems, and VM latencies (and there *are* VM latencies, no matter what the .NET advocates tell you) D has very few libs, whereas .NET has a wealth of them. D has proper templates. .NET does not D can directly link to C functions. .NET must interface via P/Invoke D has a reasonably responsive provider. Try getting your ideas adopted into .NET D has very little exposure in the industry. .NET doesn't have this problem. D has an overhead of about 60k (which is too much). .NET's overhead is measured in megabytes (which, like Java, is a joke). D has std.recls. .NET doesn't (although there is a recls .NET mapping) D has Walter Bright. .NET has Anders Hejlsberg. "the Poor Novice One" <the_member pathlink.com> wrote in message news:cdr2au$1u2u$1 digitaldaemon.com...Goodday Fellows! Please don't mention the DMD and Wiki comparisons of D with other languages.I just want to know the personal views of the this great community on this topic.
Jul 23 2004
Matthew wrote:D has an overhead of about 60k (which is too much). .NET's overhead is measured in megabytes (which, like Java, is a joke).I don't know about compilers (how to make them but I do know how they work overall) but what is this overhead of 60k? Does C++ compilers do that too or is the 60k from the Garbage Collector?
Jul 24 2004
Gold Dragon wrote:Matthew wrote:It's more the garbage collector than anything else. In C++, there's no garbage collection. In the long run (i.e. larger and more complex programs), D programs should be smaller than equivalent C++ programs. -- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/D has an overhead of about 60k (which is too much). .NET's overhead is measured in megabytes (which, like Java, is a joke).I don't know about compilers (how to make them but I do know how they work overall) but what is this overhead of 60k? Does C++ compilers do that too or is the 60k from the Garbage Collector?
Jul 24 2004
In article <cdr2au$1u2u$1 digitaldaemon.com>, the Poor Novice One says...Goodday Fellows! Please don't mention the DMD and Wiki comparisons of D with other languages.I just want to know the personal views of the this great community on this topic.(If anyone feels that I'm off base with this, please feel free to critique my statements. :) ) assembly manager, and JIT compiler. These features have advantages in their own right, but are an extravagance when writing small apps. Furthermore, the .NET runtime download is *huge* when downloaded via modem. D provides a much more friendly alternative as it has a much smaller development kit and requires no runtime download at all for end-users of programs made using D. This also means that programs with D will experience any compatibility mishaps that an upgrade run just great on any Win32 machine (NT4,95,98,Me,2000,XP) without the need for NET, which leaves systems older Windows systems out of the picture. require a change to the CLI, as that could disrupt other languages that rely upon it as well. D may continue to develop as DigitalMars sees fit, without concerns of disrupting other products. Furthermore, improvements to the D specification are accomplished without the beuracracy of a standards body at this time. 4) Simple and easy to use development kit that works well with existing tools. NET has had a long bumpy road, requiring the development of new debugging and development tools along the way. This has hurt Microsoft and the development community alike by requiring the purchase or creation of (not to mention training for) these new programming tools. D, on the other hand, works perfectly fine with existing debuggers and IDE's. Furthermore, D maintains link-compatibility with C, so existing libraries may still be used with this new language; .NET only maintains backwards compatibility via COM binaries and. 5) Vendor provided, cross platform capability and compatibility. Granted, .GNU and Mono have done an incredible job of bringing .NET to Linux and BSD. However, these projects are 100% complete rewrites of Microsoft's implementation. D, on the other hand, is available for Windows as well as Linux, thanks to sharing DigitalMars' D compiler front-end. This means that code written in D can be compiled and run on either platform with very little effort. performance losses when forced through the JIT compilation process, which also causes more memory and disk bloat. D relies on tried-and-true development tools and techniques and requires relatively little to thrive on any given system. D exists on multiple platforms (legacy and new alike) in an unhindered way, where - Pragma
Jul 23 2004
2) D has fewer kitchen sinks (though it does seem to be getting more and more) 3) D does arrays right 4) D wasn't born with a silver spoon in its mouth 5) D plays better with others ps- My personal favorite Mr T quote: "Prediction? pain-n-n-n" "the Poor Novice One" <the_member pathlink.com> wrote in message news:cdr2au$1u2u$1 digitaldaemon.com...Goodday Fellows! Please don't mention the DMD and Wiki comparisons of D with otherlanguages.Ijust want to know the personal views of the this great community on thistopic.
Jul 23 2004
"Ben Hinkle" <bhinkle mathworks.com> wrote in message news:cdr9mv$23ll$1 digitaldaemon.com...2) D has fewer kitchen sinks (though it does seem to be getting more and more)What do you mean by a kitchen sink? Phill.
Jul 23 2004
What do you mean by a kitchen sink?i think he's referring to "everything but the kitchen sink" i.e. extra cool features.
Jul 23 2004
Phill wrote:"Ben Hinkle" <bhinkle mathworks.com> wrote in message news:cdr9mv$23ll$1 digitaldaemon.com...http://www.goenglish.com/EverythingButTheKitchenSink.asp roughly the same features and it just many small things that become the difference. I would count C++ as something that has "lost the simplicity of C".2) D has fewer kitchen sinks (though it does seem to be getting more and more)What do you mean by a kitchen sink? Phill.
Jul 23 2004
"Ben Hinkle" <bhinkle4 juno.com> wrote in message news:cdsgjs$3u5$1 digitaldaemon.com...Phill wrote:and"Ben Hinkle" <bhinkle mathworks.com> wrote in message news:cdr9mv$23ll$1 digitaldaemon.com...2) D has fewer kitchen sinks (though it does seem to be getting morethehttp://www.goenglish.com/EverythingButTheKitchenSink.aspmore)What do you mean by a kitchen sink? Phill.roughly the same features and it just many small things that become the difference. I would count C++ as something that has "lost the simplicityofC".oic, thanks. Phill.
Jul 23 2004
the Poor Novice One wrote:Please don't mention the DMD and Wiki comparisons of D with other languages.I just want to know the personal views of the this great community on this topic.(1) D is in the spirit of C: high performance and a small footprint (2) D is a community project: a Bright mind and an open community (3) D is built to last: Walter puts his livelong experience in to do it right. (4) D is simple: it is built to be usable for everybody, even single programmers be happy to have a lot of experts for all of its 3000+ classes) (5) D is consistent: you must be if you do with resources so restricted. -- Helmut Leitner leitner hls.via.at Graz, Austria www.hls-software.com
Jul 23 2004
the Poor Novice One wrote:Goodday Fellows! Please don't mention the DMD and Wiki comparisons of D with other languages.I just want to know the personal views of the this great community on this topic.I would simply like to add that if the code gods smile upon me, D will soon be able to interop with .NET while still maintaining it's current compatibility with C-linked binaries. think we can all agree is for the best.
Jul 23 2004
In article <cdrvfr$2lmr$1 digitaldaemon.com>, Deja Augustine says...the Poor Novice One wrote:Success and Happiness to you , mr.Deja !Goodday Fellows! Please don't mention the DMD and Wiki comparisons of D with other languages.I just want to know the personal views of the this great community on this topic.I would simply like to add that if the code gods smile upon me, D will soon be able to interop with .NET while still maintaining it's current compatibility with C-linked binaries. think we can all agree is for the best.
Jul 23 2004
Deja Augustine wrote:the Poor Novice One wrote:Sounds like fun. Would it have access to the many, many .NET libraries out there? -- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/Goodday Fellows! Please don't mention the DMD and Wiki comparisons of D with other languages.I just want to know the personal views of the this great community on this topic.I would simply like to add that if the code gods smile upon me, D will soon be able to interop with .NET while still maintaining it's current compatibility with C-linked binaries. think we can all agree is for the best.
Jul 23 2004
J C Calvarese wrote:Deja Augustine wrote:Of course.the Poor Novice One wrote:Sounds like fun. Would it have access to the many, many .NET libraries out there?Goodday Fellows! Please don't mention the DMD and Wiki comparisons of D with other languages.I just want to know the personal views of the this great community on this topic.I would simply like to add that if the code gods smile upon me, D will soon be able to interop with .NET while still maintaining it's current compatibility with C-linked binaries. think we can all agree is for the best.
Jul 23 2004
This is a little late reply for this thread (does anyone even read the old topics?), but I've decided to share my experiences with these languages. things are pretty much incompatible with each other, so I doubd that any godsend. Every value type is mapped to a struct that contains some necessary properties and methods appropriate for the type. The pinnacle to an object, one can call ToString() for /everything/. That allows the following syntax: This is by far the nicest string formatting syntax in the C family of languages that I've ever seen. By a large margin. In fact, that kind of formatting syntax is only possible because of automatic boxing. It also makes template programming easier since everything is guaranteed to be a System.Object, really. I also like how the value types are logically mapped into the equivalent structs. Important things like maximum value and such are intuitively mapped into Int32.MaxValue and such. D's view on this one (int.sizeof and such) seems a bit hackish. It /seems/ that there is a struct "int" or "Int32" somewhere in D containing the sizes and maximum values, but there isn't. NET's view on this one is simply more OOP, logical and intuitive, IMO. to use ref and out specifiers also in a method call, and not just method definition. I certainly like that a lot. It makes the code much nicer to read. I would love to have that in D. since D showed the world how arrays *should* be handled. It's the plain old non-resizable, second-class citizen view. No slices or anything like that. Array.Equals() only checks for address and not contents (as well as operator== for arrays), and Array.GetHashCode() generates the hash code based on the address instead of the contents. Since you can't overload Equals() or operator== for arrays, you have to write a comparison function to check whether array contents are identical. It's trivial work, but it's not /fun/ as in D. Also when overloading operator== for user-specified types, you have to hackishly check for null since == can't be used for that anymore. I do it as !(x is object) since that can only fail if x is null. It's still not as nice as it could be. D has explicit operators for comparing the contents (==) and address (===). That is indeed very nice.
Aug 06 2004
Niko Korhonen wrote:This is by far the nicest string formatting syntax in the C family of languages that I've ever seen.writefln(toString(x), ": ", obj.toString()); yes.This is one of the things I (and a lot of other people, it seems) would really like to see included in 1.0 (not after).and it requires you to use ref and out specifiers also in a method call and not just method definition.I would like to see "in" parameter specification enforced (producing a compile error if you try to change an in parameter) but I don't see the point in forcing the calls to use in/out/inout.
Aug 06 2004
Juanjo Álvarez wrote:writefln(toString(x), ": ", obj.toString());Yes, this is a recently added feature in D and I like it. However, it's type in D. But it does remain as a minor nuance.I would like to see "in" parameter specification enforced (producing a compile error if you try to change an in parameter) but I don't see the point in forcing the calls to use in/out/inout.A quick example: Does func() change the value of x? You can't be sure. It's very unlikely, since POD types are passed by value and not reference. A programmer with a C or Java background will think it's very unlikely that x will change. But when it *does* change (the function was declared as void func(out int x)), you're in for a mighty surprise. In C it is: It's also obvious that x will change. But in C++/D: You have no idea whether x will be changed without looking at the function declaration/definition. Not that this wouldn't be ridiculously easy in Visual Studio or any good IDE, though. This is also a minor nuance, but it still IMHO tips the scale in favour
Aug 06 2004
In article <cf00i1$bov$1 digitaldaemon.com>, Niko Korhonen says...A quick example: Does func() change the value of x? You can't be sure. It's very unlikely, since POD types are passed by value and not reference. A programmer with a C or Java background will think it's very unlikely that x will change. But when it *does* change (the function was declared as void func(out int x)), you're in for a mighty surprise.I think it should be safe to assume that the programmer knows the definition of the function he/she is calling. When giving pointers in C you also "never know" whether the function is just reading the data (can't pass strings or large data structures without using pointers) or if it's altering it. Unless you actually RTFM ;-) Nick
Aug 06 2004
In article <cf088n$huv$1 digitaldaemon.com>, Nick says...In article <cf00i1$bov$1 digitaldaemon.com>, Niko Korhonen says...work, whereas D can, as it's compiled directly into machine code, with the obvious speed advantage it implies.A quick example: Does func() change the value of x? You can't be sure. It's very unlikely, since POD types are passed by value and not reference. A programmer with a C or Java background will think it's very unlikely that x will change. But when it *does* change (the function was declared as void func(out int x)), you're in for a mighty surprise.I think it should be safe to assume that the programmer knows the definition of the function he/she is calling. When giving pointers in C you also "never know" whether the function is just reading the data (can't pass strings or large data structures without using pointers) or if it's altering it. Unless you actually RTFM ;-) Nick
Aug 06 2004
work, whereas D can, as it's compiled directly into machine code, with the obvious speed advantage it implies.have they? Or Linux? They use that portability crap as marketing, when really And, so what if D isn't interpreted? It's faster when it's compiled, and if D is ever ported to other OSes, all you would have to do is recompile it on that new system.
Aug 06 2004
kinghajj wrote:The marketing machine for MS never leaves MS systems. What they claim is the "big win" is that VB programmers can use and extend classes is not necessarily cross-platform but cross-language. I guess it is how you define platform that matters. :/work, whereas D can, as it's compiled directly into machine code, with the obvious speed advantage it implies.have they? Or Linux? They use that portability crap as marketing, when reallyAnd, so what if D isn't interpreted? It's faster when it's compiled, and if D is ever ported to other OSes, all you would have to do is recompile it on that new system.
Aug 06 2004
In article <cf0c4t$ldl$1 digitaldaemon.com>, kinghajj says...have they? Or Linux? They use that portability crap as marketing, when reallyBy the way, last I heard MS *was* working on .NET for Linux. But the popular consensus seems to be that it will be incomplete and inteded to allow folks to use web services and such. As for the Mac... that will probably be up to Apple to take care of.And, so what if D isn't interpreted? It's faster when it's compiled, and if D is ever ported to other OSes, all you would have to do is recompile it on that new system.There are really only a few advantages to .NET. The greatest advantage for MS folks is that it replaces COM, MFC, and a host of other badly designed technologies. Beyond that its only real advantage over compiled code is that it can be used for web services and the like, just like Java applets. ie. stuff can run quite easily in a sandbox. But the CLI is on its way to standardization so there's no reason that someone can't create a D/CLI compiler. In fact it looks like someone's already working on that :) Sean
Aug 06 2004
"Sean Kelly" <sean f4.ca> wrote in message news:cf0k9v$pt8$1 digitaldaemon.com...In article <cf0c4t$ldl$1 digitaldaemon.com>, kinghajj says...Just out of interest, what're your criticisms of COM?have they? Or Linux? They use that portability crap as marketing, when reallyBy the way, last I heard MS *was* working on .NET for Linux. But the popular consensus seems to be that it will be incomplete and inteded to allow folks to use web services and such. As for the Mac... that will probably be up to Apple to take care of.And, so what if D isn't interpreted? It's faster when it's compiled, and if D is ever ported to other OSes, all you would have to do is recompile it on that new system.There are really only a few advantages to .NET. The greatest advantage for MS folks is that it replaces COM, MFC, and a host of other badly designed technologies. Beyond that its only real advantage over compiled code is that it can be used for web services and the like, just like Java applets. ie. stuff can run quite easily in a sandbox. But the CLI is on its way to standardization so there's no reason that someone can't create a D/CLI compiler. In fact it looks like someone's already working on that :)
Aug 07 2004
In article <cf2f70$1pjs$1 digitaldaemon.com>, Matthew says...Just out of interest, what're your criticisms of COM?Frankly, I haven't used it enough to offer a truly informed answer. COM has just always seemed a terribly complex solution to the problems it was attempting to solve. I'll admit, however, that a lot of my complaints about MS APIs stem from the fact that their use in C++ has always been a hundred times more complicated than in any other supported language, and usually expects the use of macros and such that really should not have been necessary (though I grant that getting rid of them may have resulted in slower code). .NET may have a more complex back-end than MS' previous ideas, but its design is the cleanest they've produced. Sean
Aug 07 2004
Lord Syl wrote:work, whereas D can, as it's compiled directly into machine code, with the obvious speed advantage it implies.Actually, that's a misnomer. The way the .NET stuff runs is that the bytecode is delay-compiled. IOW, it is fully compiled by the time the user actually uses the code--but it is stored and distributed in a platform neutral bytecode format. Contrast this with Java hot spot which will compile hot spots based on what is actually executed for a method. That means that certain code can actually get optimized out. Same idea as above, but different effect.
Aug 06 2004
In article <cf0a88$k98$1 digitaldaemon.com>, Lord Syl says...work, whereas D can, as it's compiled directly into machine code, with the obvious speed advantage it implies.as CLI bytecode until needed. Herb Sutter has been writing some interesting articles recently on the advantages and disadvantages of different execution methods. All in all .NET is one of the better things MS has ever done. Sean
Aug 06 2004
Sean Kelly wrote:In article <cf0a88$k98$1 digitaldaemon.com>, Lord Syl says...The really ironic thing is that a company with less influence could have never pulled it off. Microsoft is abusing their monopoly to make software development better. :) (and not just better on Windows, either. Mono wouldn't have appeared if not for .NET. Shame on you, Microsoft!!) -- andywork, whereas D can, as it's compiled directly into machine code, with the obvious speed advantage it implies.as CLI bytecode until needed. Herb Sutter has been writing some interesting articles recently on the advantages and disadvantages of different execution methods. All in all .NET is one of the better things MS has ever done.
Aug 06 2004
Lord Syl wrote:used for systems work, whereas D can, as it's compiled directly into machine code, with the obvious speed advantage it implies.That's oversimplifying .NET a little too much. Managed C++ also, etc. CL (Common Language?) is somewhat "interpreted," but in the same way Java bytecode is "interpreted." That is to say, at some point, it ends up running as native code. This is a big contrast to true interpreted languages such as shell scripts, where each line is interpreted every time through. (You can modify a shell script on the fly as long as you're careful about it, and the changes will take effect immediately.) code. Just like there exist several compilers for compiling Java to 100% certainty as people will gradually get paranoid about the performance issues, just like they did with Java (and wrongly so. GJC compiled Java code ends up running slower than the JVM could run it. It only starts up much faster. :-)) as well as any D program could. Likewise, there also seem to be efforts to make an interpreted, or a .NET semi-interpreted version of D, so I'm not sure one can make a language comparison based on differences in two specific runtime implementations. TX -- Email: Trejkaz Xaoza <trejkaz xaoza.net> Web site: http://xaoza.net/trejkaz/ Jabber ID: trejkaz jabber.xaoza.net GPG Fingerprint: 9EEB 97D7 8F7B 7977 F39F A62C B8C7 BC8B 037E EA73
Aug 21 2004
Nick wrote:In article <cf00i1$bov$1 digitaldaemon.com>, Niko Korhonen says...Even then, you never *really* know until you read the source code....A quick example: Does func() change the value of x? You can't be sure. It's very unlikely, since POD types are passed by value and not reference. A programmer with a C or Java background will think it's very unlikely that x will change. But when it *does* change (the function was declared as void func(out int x)), you're in for a mighty surprise.I think it should be safe to assume that the programmer knows the definition of the function he/she is calling. When giving pointers in C you also "never know" whether the function is just reading the data (can't pass strings or large data structures without using pointers) or if it's altering it. Unless you actually RTFM ;-)
Aug 06 2004