PDA

View Full Version : What's the best language ? Newbie question =D



04-23-2003, 04:17 PM
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

JanHH
04-23-2003, 04:24 PM
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.).

Perspective
04-23-2003, 06:30 PM
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!)

Mazy
04-24-2003, 12:22 AM
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 http://www.opengl.org/discussion_boards/ubb/smile.gif so if you like delphi, you can stick to it

Andrew Jameson
04-24-2003, 03:31 AM
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 (http://www.sulaco.co.za)

Cheers
Andrew

starman
04-24-2003, 10:47 AM
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 ;-)

04-25-2003, 12:00 PM
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

04-28-2003, 06:58 AM
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.

04-28-2003, 05:01 PM
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.

HalcyonBlaze
04-28-2003, 07:31 PM
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

graphicsMan
04-28-2003, 07:40 PM
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 http://www.opengl.org/discussion_boards/ubb/smile.gif

Brian

JanHH
04-28-2003, 07:57 PM
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

JustHanging
04-29-2003, 02:05 AM
...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

M/\dm/\n
04-29-2003, 02:27 AM
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'm in it & I'm geting sick every time I look at Delphi. And UI, you can't compare Borlands (Delphi & C++ Builder) s**t with MSVC.NET UI (Auto tabs, gropings, bookmarks, highlighting mmmmm, I just love that http://www.opengl.org/discussion_boards/ubb/biggrin.gif )
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).

satan
04-29-2003, 02:56 AM
Originally posted by M/\dm/\n:
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.

M/\dm/\n
04-29-2003, 03:14 AM
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.

satan
04-29-2003, 07:26 AM
Originally posted by M/\dm/\n:
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). http://www.opengl.org/discussion_boards/ubb/smile.gif

starman
04-29-2003, 09:10 AM
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.

starman
04-29-2003, 09:12 AM
VC++ is a steaming pile compared to CPP Builder. Sorry if I offended anyone..;-)

Deiussum
04-29-2003, 11:57 AM
Everyone is entitled to their own opinions. http://www.opengl.org/discussion_boards/ubb/smile.gif 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.

starman
04-29-2003, 01:05 PM
VC++ has a better IDE and debugger, but I think Borland's VCL is superior to MFC. Drag, drop, write handler, done. No more message map wierdness.

Watcher
04-29-2003, 07:03 PM
I like Visual C++, but MFC is horrible. God help anyone who tries to learn proper object-oriented design from it. There are probably some BASIC programs that are more well-designed than MFC.

As for the language, I'd say go for any language that suits your fancy to start out with OpenGL. Learning the library is independent of language, so do what is most comfortable. However, if you are interested in developing applications professionally, C/C++ is your best choice. I don't want to seem like I'm using herd mentality or anything, but there's a reason 99.9+% of successful commercial applications are written in C/C++. Other languages just can't compete in terms of speed, scalability, and power. If you asked id why they didn't write the Quake 1/2/3 engine in Java, they'd probably laugh in your face.

roffe
04-29-2003, 08:52 PM
How much faster is C/C++ against Java/Other language?

Here is one comparison: http://www.bagley.org/~doug/shootout/craps.shtml

04-30-2003, 09:55 PM
That comparison is very misleading.
All languages is designed with some typical use in mind. For example has Java a runtime system with memory management. It is possible to write programs that does not use it, but that does that prove?

Java may be slow compared to C/C++ but is a real speed monster compared to the lisp like languages if the program is developed in a normal way. The main reason for this is that such languages creates a lot of intermediate objects that the system must take care of.