Right Don, exactly.Don wrote:For chess, Java is a poor choice if you want performance. It does not have the low level support you need. It's also a memory pig but there may be ways to work around that. For many types of applications it is not much slower than C or C++ but for the low level bit-twiddling attention to detail and memory management you need for a really high performance chess program, it's a terrible choice.
If you want a pretty good chess program (but not great program) that is portable, then it's probably a reasonable choice.
I honestly don't think C is that portable. It you stick with some specific dialect of C such as ansii C it is portable, but in a real world program you cannot do that. You still have to deal with platform differences in the real world.
My code is peppered with #ifdef's to deal with difference between compilers and platforms and it's annoying.
My experience is that Java really is much more portable. I do not know if this applies to the hand-held devices which use subsets or variations of java.
Just one note.
What I was trying to convey was that if you want to learn a new language and chess is just a means to that end, then I'd not recommend C or C++. Granted these languages excel in small performance demanding codes but are, IMHO, not good for much else. You might as well be writing in Fortran.