|
Post by Kuuran on Jun 11, 2003 15:19:05 GMT -5
At some level you have to point to memory, yes, but in java and C# that control is taken away from the user and put into the hands of very restricting functionality that's part of the language. Passing things by reference and such lets you have a taste, for cases where pointer functionality is absolutely critical, but otherwise it's quite restrictive. In my opinion C# is like Java without the write once, read anywhere (well.. sometimes ) power of java (albeit that makes it faster), or the raw power of C/C++. Aside from not requiring a ridiculously complex and overglorified interpreter to run, it's got the worst of both worlds. Of course, that's just my usual optimistic view on things
|
|
|
Post by Kawigi on Jun 11, 2003 15:48:26 GMT -5
In both Java and C#, objects are used/passed by reference, so they can be considered pointers. But primitives aren't used by reference in either language (there's a discrepency, though, C# treats strings as primitives in this case and Java treats them as final objects, a small difference internally if nothing else). But you can still declare an 'output parameter', which is the equivalent of passing a primitive by reference in C/C++.
Now, if you're a big fan of pointer arithmetic and not a big fan of security sandboxes, neither Java nor C# is for you. Although I have a friend who helped write the original C# and he made it sound like it was still possible in C# if you can get through some red tape (superuser privileges maybe?). He described it as thus (leave it to a compiler author to put it this way):
With C, we give you a loaded and thingyed rifle and point it at your foot. With C++, we give you a loaded rifle and point it away from you. With C#, we give you an unloaded rifle and some bullets, just in case you want to load it and point it at your foot.
Also, I beg to differ with you on one other point. C# code does (by default at least) run on a ridiculously complex and overglorified interpreter known as the CLR (Common Language Runtime), which is (give or take) basically the same thing we like to call "The .NET Framework". It can also optionally be compiled to native code.
|
|
|
Post by Kuuran on Jun 11, 2003 15:55:24 GMT -5
My understanding of that made it rather different from Java VM. Besides, anytime you have any easy native compile option you're ahead of java in this sense. Point well taken, though. Oh, right, and a bit of a less witty rebuttal. Depending on the problem scope I'll take either C or C++. C is for the small problems which are gnawing on your ankles anyway, and C++ is for the big problems which are surrounding you. Now, let's see you load that gun before getting eaten.
|
|
|
Post by Kawigi on Jun 11, 2003 16:01:03 GMT -5
I tend to think that Perl is for the little gnawing problems ;-) (or one of the other powerful scripting engines out there, like Python or Tcl or something)
|
|
|
Post by Kuuran on Jun 11, 2003 16:20:53 GMT -5
Heh, my definition of big and little there would classify about any bot out there well into the little. Big being enterprise stuff that needs the structure of C++ and gets any raw speed loss back easily in organization, maintainability, etc.
|
|
|
Post by Kawigi on Jun 11, 2003 16:46:38 GMT -5
That version of big sounds like what I think of for C#, but Visual Studio doesn't cut it very well for that sort of project, unfortunately (Microsoft actually uses a seperate build system instead).
|
|
|
Post by Kuuran on Jun 11, 2003 21:34:03 GMT -5
I find C++ is the perfect system for that. Trying to do it in C# would probably make me angry. Java isn't bad, but you use java if you're writing cross-platform, otherwise you use C++. C is great for smaller projects, or big projects with few people working on them, or hell, I love C
|
|
|
Post by mdouet on Jun 11, 2003 22:59:41 GMT -5
My project uses straight C and I don't consider us a small project. We use it because we can't afford the overhead of an OO language since our software runs at a very low layer.
|
|
|
Post by Kuuran on Jun 13, 2003 15:16:57 GMT -5
Yeah, I guess I should have said the overhead of OO is usually made up. Low-level stuff still likes C and asm.
|
|