Re: My thoughts on C# and gaming.
OvermindDL1 <[email protected]>
| Newsgroups | gmane.games.devel.sweng |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Jan 27, 2010 at 4:22 PM, Emil Dotchevski <[email protected]> wrote: > Compare this to C++: while "code" is integrated in the type system of > the language (for example void(int) is a type) a C++ program can not > create code dynamically. The only thing that can do that is a > compiler, which is not part of the language itself. So that's a > completely different level of separation between code and data. Actually I have LLVM embedded into a few projects, one is a noise generator. You literally just give it an iterator range and it spits out a plain C function pointer, where the iterator range is to the noise description data, and the plain C function pointer is an LLVM generated version of the noise function very well optimized, so yes, you can have C/C++ create code on demand as well, but as with everything in C++ you have to import a library (and LLVM is not the only one that can do this). C++ does not follow the *everything* as part of the runtime because libraries can do it all anyway, and there can be many ways to do various things. C++ can be extended to do anything, *and* do it fast, unlike higher level languages. As keeps being used, look at Spirit, it creates a parser that runs faster then anything else tested against it (it can even convert a string integer to an int faster then atoi/strtol), and it is *very* high level. _______________________________________________ Sweng-Gamedev mailing list [email protected] http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com