• C# limitations
    36 replies, posted
Can we see this program?
Java has JNI or something, but it looks like a freaking bitch to work with, and I do have a complaint with DllImport, and that is that you cant really use it with C++ classes, but still. Not sure that javas one is any better though, i think it is just like DllImport, but it is not as advanced. Can't say this personally, as I haven't used it.
I don't have access to it. It was just a simple program to load a file decrypt it and resave it. Sorry I don't have the program to support my post. I will however ask the guy if he can upload it.
[QUOTE=gparent;23625896]The whole Java is slow thing is usually bullshit claimed by people who couldn't write good code in any language anyway. Or people who do not know about the server VM, or who insist on doing complicated design patterns that multiplies your object count by 4 and accomplishes nothing. Good java is fast. Good C# is fast. Bad Java is slow. Bad C# is slow.[/QUOTE] This is only partially true. It is true that if you write quicksort in both C and Java, both implementations will have time complexities of O(nlogn), but they are separated by a constant factor. An optimal Java implementation of an algorithm _cannot_ surpass an optimal C implementation in speed. This is the price of the generalizations that Java makes for the sake of portability. Any given JVM is, after all, likely written in C to begin with. This is by design. Sun didn't set out to make the [I]fastest[/I] language, they set out to make the [I]most portable[/I] language. Arguably, they succeeded in this regard. Note that I am talking specifically about the language itself. If you are making frequent, repeated calls to some library (I'll use OpenGL as an example), you won't notice a difference in speed. This is because OpenGL routines are the same regardless of the language which they are bound to. Python as a language is slow as balls. Well-designed Python applications are speedy because the processor spends more time running library routines (written in C) than parsing and executing Python code. Same shit with Java. [b]Edit:[/b] Forgot this was a C# thread. I suppose if you compare Java with C#, the difference is probably marginal.
Yeah, I said nothing about C, which is probably faster than most languages out there anyway.
[QUOTE=Programmdude;23650666] And to do delegates like that you do: void setMyCallback(System.Func<int, int> f) { } Supported in .net 4 and 3.5[/QUOTE] Never knew about that, thanks.
[QUOTE=toaster468;23625852]could it be used for a simple game the size of minecraft? I dont want to make a game like minecraft its just the only game i know of with a huge map as it does and is C# and faster than Java? I heard there was a massive difference between the two speed wise.[/QUOTE] Take a look at this [url]www.facebook.com/pages/CUBE/193994696905[/url] it's similar to minecraft (They got the idea off it I believe), programed in C# (I think there still using XNA) and written by some students at my school.
Sorry, you need to Log In to post a reply to this thread.