Quote:
Originally Posted by Celemourn
Yes, I was very sloppy with my language in that post.
BUT
You'd have to show me some evidence before I buy that bytecode can approach the speed of machine code.
C# and Managed C++ compile down to MSIL code and executes in the CLR. C++ can actually run slower than C# but depending on application you may not see much difference at all (ie when you are IO bound). There are benchmarks where C# ran faster than managed C++ but slower than Java or C++.
For an example of speed try NASA World Wind. Written in C# and Managed Direct X.
The biggest advantage of C# over unmanaged C++ is that the .NET framework is soooo much nicer to work in. Likewise Java vs C++ though STL and newer extensions have closed the gap. A little.
IMHO as a C/C++/Java/C# developer I think that C++ isn't very compelling anymore. C for speed and C#/Java for ease of programming. ObjectiveC for Mac.
C++ is kinda half way inbetween low level (pointers) and modern high level languages.
Quote:
Bytecode MUST be translated into machine code before it can be used, thereby adding at LEAST one extra cycle for every command. How can that be anywhere close to the speed that you can get from a machine code compile? By using an efficient JIT compiler and an inefficient machine code compiler? Go get an efficient machine code compiler.
Java is faster than gcc in some benchmarks:
http://java.sys-con.com/read/45250.h...84C96D46498798
Granted that gcc is one of the slower (if not slowest commonly used) compilers. Presumably using an Intel, Sun or even MS compiler would have resulted in a faster executable. Definiately Intel...it's one of the nicer advantages of moving to the intel platform for the mac. The potential of using Intel's compilers to generate fast code on the platform.
Quote:
Additionally: Every program written in C# requires .NET framework to be present on the computer... I THINK.... verify please?
Yes and no. Mono's CLI isn't called .NET but it is a CLI. However, it's like complaining that Java must be installed. So what? The installer takes care of it for you.
Quote:
Additionally: C# is EXTREMELY high level. The higher the language, the less efficient it is, by necessity.
See above. In any case C++ is considered a high level language as well. Just an older one with modern extensions hacked on.
Efficiency is goverened by many things but typically programmer efficiency is considered more important than language efficiency these days...or we'd still be using Assembly.
Quote:
Additionally: C# does stupid things like require you to store the Main function (called methods in C#) as a class object. You then must instantiate an object of that class before you can use any functions that you may have written outside of the Main. That should be implicit.
Never learned about static methods have we? If you have a static method called Bar in class Foo you can call Foo.Bar() without instantiating a Foo. In fact you can't call Bar except as Foo.Bar(). Calling it via FooInstance.Bar() should result in a compilation error.
Quote:
Additionally: It's 3 am and I can't think of anthing else right now. Go with C++, and use visual studio if you wish, so that you can take advantage of the .NET libraries. You will have the benefits of C# (the library) and also the ability to use the same language on multiple platforms.
Managed C++ appears to be the worst of all worlds in terms of performance (the collection class called appear to be abysmally slow in comparison to C#), syntax and cross platform compatibility (managed C++ is the least likely to run under Mono).
Java is more cross platform and C is faster. If you know both C#/Java and C you can likely handle most idiosyncracies of C++.
Vinea
PS. C#/.NET was one of the two hot software careers on Money. The other was quality assurance (ugh). Can't find the link but that's what I remember seeing last year. Fortunately it seems we're on a rebound with Software Engineer (in general) topping the charts again:
http://money.cnn.com/magazines/money...p50/index.html