What's the best language ? Newbie question =D

Hi people,

I’ve just started learning OpenGL, i already code in Java and Delphi, but it seems that OpenGL can be used in several languages, so i’d like yours opinion about the best language to use, i mean performance and if supports cross plataform too ? If i use Java or Delphi instead of other languages like C++ what i lose and gain ?

I guess you heard these questions a lot =D, sorry, but i’m little lost, i know that OpenGL is identical for all languages, but there are always some differences that make programmers choose some specific language.

Thank very much for yours attention.

Karluqs

Java is crossplatform, but slow.

OpenGL with Delphi is kind of “exotic” and also absolutely not compatible across platforms (and kylix is also very slow, in my opinion).

So obvioulsy, what remains is c++, which is cross platform compatible to a certain extent (especially when using glut), fast and also something like the standard (most examples are c++, games etc.).

c/c++ is definatly the best choice for performance. if you already know java, learning c++ isnt hard. once you know OOP you just need to apply it to different syntax(and learn memory managment too!)

I dont think delphi is that ‘exotic’ and the speed of it is quite enough for most stuff. if your mostly pumping polygons and not having very heavy calculations then delphi is more than enough… and beyond that its mosly up to the developer to reach the speed… i have done my share of metagrids in delphi and matches the c++ ones in speed so if you like delphi, you can stick to it

I totally concur with Mazy … if you’re new to OpenGL then your learning curve is going to be steep without throwing in another language too … so stick with what you already know … Delphi !

I’ve not found any problems with using Delphi - speed … Delphi’s compilers produce highly optimized code and there’s little solid evidence to substantiate what really is faster than what ! … and you’re going to find OOP really essential and that’s what Delphi’s really good at …

If you want a good start in the Delphi OpenGL experience then drop by this site …
www.sulaco.co.za

Cheers
Andrew

That’s kind of like asking “how long is a piece of string?”. What do you plan to do with OpenGL? Interactive, mostly static graphics (like CAD)? Animation? Real-time interactive graphics (like 3-D games)?

The more performance sensitive your application gets, the more I’d lean towards C++. If you’re just learning, however, I concur with the previous two posters - stick with Delphi and keep the number of learning curves to one :wink:

Ok, i got it, my intention is to focus in 3d Charts (i´ve just forgot to tell, sorry =D), so using Delphi there will be no problem to do it using OpenGL, since you say that OpenGL is equal in all languages.
Delphi is native compiled and a greate language the 3d Charts will no problem for it, that´s great news for me, because i would not like to learn C++, i just dont have time for it now.

Thanks a lot for all, you really know to discuss a problem =D

Karluqs

janhh, java isn’t slow at all… maybe some time around java 1.0 it was, but those days are very much gone. the most pessimistic reports say its four times slower than c++, the most optimistic reports say it is already exceeding c++ in some things - raw calaulations like ffts and anything that does repetetitive calcs really benefits from hotspots runtime optimisations

if someone is just starting to learn opengl then do you really think speed is an issue anyway?

karlugs, if delphi and java are what you know, pick one and start playing. anything you learn now will be transportable to any other language you decide to use opengl with. you really don’t need the hassle of c++ right now, leave that battle for another day if at all.

the performance difference between delphi and java probably isn’t relevant, and while java is more cross-platform portable that doesn’t matter unless your going to exploit it. if you’re happier with delphi, stick with it.

Languages like Java is slow compared to C/C++. They are trading some performance in return for faster development. Its not a constant value like 4 times slower and can be much worse. All languages with automatic garbage collecting can be tricky with real time applications.

Java will always be slower with the kind of hardware used today.

The reason Java is slow is because of it being a compiler AND interperter. It compiles your code part way and then runs line by line through the form it compiled to to exectute your program. A completely compiled program like the ones made from C/C++ will always run much faster, but they need to be recompiled to run in different environments. Java is compiled to the point that it can run on any platform. Then the java virtual machine takes over and runs through the compiled code line by line. That process is quite slow as you can probably guess.

  • Halcyon

Java can be compiled… however, you’re right that the garbage collector can be a pain in the a$$. If your program is GPU (graphics) limited, it shouldn’t really matter that the host app is running a bit slower - if you already know Java, go with it. If you don’t know C++, though, you probably should learn it

Brian

to Fredreich, Java is REALLY slow, it is much much slower than c++, probably by a factor of hundreds or thousands, wich also meets my personal experiences with it. And Karluqs did not ask in what language opengl is easiest to learn for him, but which one is the best language for opengl.

And please do not misunderstand me, I LOVE java, allin all it’s my favourite programming language, but nonetheless it is slow and only useful for certain things (but for theses things its very good).

Jan

…so just use Delphi, at least if you can live with Windows. I’ve done all my serious graphics stuff with. It’s fast, you know it AND there’s http://www.delphi3d.net

End of commercial.

-Ilkka

Drop that Delphi, all this Borland stuff is one buttonclicking ahole. If you want power and flexibility C/C++ is only way to go. I’m in it & I’m geting sick every time I look at Delphi. And UI, you can’t compare Borlands (Delphi & C++ Builder) st with MSVC.NET UI (Auto tabs, gropings, bookmarks, highlighting mmmmm, I just love that )
Excuse me if I offended someone, but that’s the point I have & will not change. Only acceptable thing about Borland’s is window designing and that’s all (if you have small project with complicated window structure Borland may be more handy).

Originally posted by M/\dm/
:
Drop that Delphi, all this Borland stuff is one buttonclicking a**hole. If you want power and flexibility C/C++ is only way to go.

I agree with your opinion on Borland but there are other object psacal compilers you can use. Freepascal (my favorite) is one of them and it is fast and cross plattform. No need for C/C++ since it is not the only way to go.
And when I am on it stay away from ALL M$ products. Their afford to cripple and destroy OpenGL is enough reason for me to say that. Remember you have the choice.
And last to come to the point of this thread. You should just use the language you feel comfortable with.

MS products are not that bad, at least whilst they have a lot of competitors. And despite the fact MS is trying they wont kill GL, because GL have advantage of using hot HW throug extensions, DX don’t have. And GL have part on their MSDN + standart windows screen savers are !!!OGL!!! based.

Originally posted by M/\dm/
:
MS products are not that bad, at least whilst they have a lot of competitors. And despite the fact MS is trying they wont kill GL, because GL have advantage of using hot HW throug extensions, DX don’t have. And GL have part on their MSDN + standart windows screen savers are !!!OGL!!! based.

Just don’t get me on M$. I switched to Linux years ago and there is nothing more to say. As I said in my previous post you have the choice (use it wisely).

Benchmarks can be written to show that any language is faster than another doing a small task. The real question is how does it scale?

And it’s not just CPU cycles, but also memory bloat that you have to be concerned about with Java.

VC++ is a steaming pile compared to CPP Builder. Sorry if I offended anyone…:wink:

Everyone is entitled to their own opinions. For me, I like using VC++ 6.0. I actually kind of like it better than the VC.Net IDE, though there are certain features from the .Net IDE that I wish was in 6.0.

I never did really like Borland’s IDE, but that’s just me. I know plenty of people that like it better.