   Other Languages - Branching Out
  I am a hobbyist who has been programming in VB6 for years, with some C++/ASM experience. Lately I've been looking into new programming languages/suites since there are surely more powerful tools now. XNA and VS2008 are new to me. I've been working with Python a bit for an elective class (it's too slow for what I'm doing), and had a realization that there are two general types of languages that fit together: scripting and low level. While there is definitely a coding speed benefit to high level scripting, I am reminded of the 80/20 rule. A high level or scripting language is perfectly fine for the majority of the code since many of the objects in language libraries/frameworks are fast and solid, but sometimes you need to optimize a small section of code. For instance, sometimes I need the speed of a function implemented in C++/ASM to plugin to VB6.From what I've read so far, it looks like C# (scripting) + XNA (graphics) is a popular high level framework for graphics programming. As far as I know, the point of the VS suite is the ability to combine different languages more easily. I am assuming that if something is too slow in C#, you can optimize a function in C++ (perhaps with inline ASM) and use that instead.I was starting to learn OpenGL based on some difficulties with Direct3D, but since "XNA is the new wrapper around native DirectX" perhaps it is now a lot more accessible. Is VS2008 + XNA capable of doing most of the 3D operations easily? How easy is it to add in high performance code for critical sections?   
  I am a big python fan so I am going to say Python\C is the way to go. But since you directly ask about C# and calling out to C++\ASM know that it is possible and not all that hard.  I have found it difficult to call in to C# from C++ but that is another matter.  What I have seen is that there is a good bit of overhead in doing it so you have to put quite a bit in C++ before it becomes a performance win.  and honestly I don't think C# is all that slow so you may be better off just staying in the language.   ;  I found that when testing some simple 2D games involving gravity simulations and trig functions, despite using tables and other optimizations it was still too slow in Python. I like the simplicity of the language and some of the dynamic features, but the cost in terms of speed seems really high. Beyond a certain point optimization just wasn't possible in Python itself. I do love Python dictionaries though.From what I am reading the point of the .NET languages is that they are easy to combine due to the common framework. I may stay with VB.NET since it is the closest to what I am familiar with; it looks like much of the WinAPI has been wrapped now into the .NET framework. I am particularly looking into 3D programming; XNA is looking like a more friendly way to access DirectX. There are times when I want to mess with things involving pointers, bit manipulation, or other low level code, in which case C++ is the winner. I haven't seem the methods for combining the languages yet.   ;  The term to google for is p\invoke.  You can freely mix VB C# and C++, but if you don't jump through the p\invoke hoops then your C++ code will be compiled to .net byte codes. Then there is no difference in what VB,net code and C++ code gets compiled to.   