I hate how people complain about managed languages. Sure the syntax in BASIC .Net is horrible(and it is), and it's performance isn't amazing. However more respectable languages such as Managed C++ and C# have several advantages over C and C++. They have a large mass of libraries backing them up, and theoretically they are cross-platform(and some open-sourced linux organizations have been taking advantage of this). Though it isn't supported directly by Microsoft, it is 100% legal. With managed languages, the JIT can, and does, compile the code to native code specifically for the host machine. (I.e it can make critical optimization decisions based on the hardware when it's compiling the CIL to native code). Where as with c\c++ it's compiled for one specific set of hardware.
.Net languages are clearly not what you'd use to write kernel-level software(though they have been used to do so, there are compact versions of the .Net framework that have been brought to the kernel-level). But I mean, come on people, most of you here are just writing hacks that won't even in the most remote effect depend on performance, so ultimately it doesn't matter at all.
Obviously if you want to write game engines professionally you need to understand C\C++ but that's the easiest part. You can inherit your OOP skills from .Net(not all of it without some hackery in C\C++), your AI knowledge from .Net, and your understanding of DirectX or any other graphics API. For example, XNA gives you the ability to access and interface with it in the same way you would DirectX.
In the end, it doesn't matter. It's easy to learn C++, but it's hard to understand and make design decisions, and understand the theory behind graphics interfaces and AI. If you ever want to perform hardware hacking though, you're going to need to take a much deeper step then C anyway.
Once you've learned C#, C++ is easy. You just need to learn how to manage memory allocation and use pointers & references. Ofc you will need to understand how to use the standard C libraries, but again this isn't too difficult after working with the .Net framework.
If you're too afraid to step into managed C++ then you're too afraid to keep up with technology, because I guarantee companies are going to start using it(I hate the new syntax too though :/).
Also, this whole argument is based upon the assumption that when we regard C++, we regard both it and the common compilers used with it, as theoretically it can be compiled the same way C# is.
Last edited by radnomguywfq3; 08-21-2010 at 07:11 AM.
There are two types of tragedies in life. One is not getting what you want, the other is getting it.
If you wake up at a different time in a different place, could you wake up as a different person?
JIT is the just in time compiler. It compiles segments of an executable as they're used. You can think of CIL like x86 assembly which isn't executed by the processor(and ofc doesn't adopt the x86 instruction set). The difference is, this code isn't directly executed on the processor, it is instead interpreted by a vm and translated to native code(code which is executed on the processor). Because interpretation by a VM is slow, it is common for .Net apps to either be
AOT compiled - Compiled directly to an x86 executable(or whatever the target platform is). I.e you can compile C# to native executable code like you can with C\C++. You can then distribute you C# application as an x86 executable binary file if you'd like. The target will still need the .Net framework installed though.
JIT compiled - Most common, and is the process of converting CIL to native executable code as the code is executed. Thus, the first time a routine is executed, it will be slightly slower then the remaining times it is executed. The advantage of this, is that the JIT can make critical optimization decisions about what the CIL is converted to. I.e if the processor offers an instruction that which can replace three or four, it will choose the faster set of instruction. This is otherwise impossible in AOH compiled languages(such as C).
Last edited by radnomguywfq3; 08-21-2010 at 08:59 AM.
There are two types of tragedies in life. One is not getting what you want, the other is getting it.
If you wake up at a different time in a different place, could you wake up as a different person?
Toxic Waltz (08-21-2010)
Moved to tutorial requests