The right language for OpenGL UI prototyping. Ditching Python
Question: So, I got this idea that I'd try to prototype an experimental user interface
using OpenGL and some physics. I know little about either of the topics, but
am pretty experienced with programming languages such as C++, Java and C#.
After some initial research, I decided on using Python (with Eclipse/PyDev)
and Qt, both new to me, and now have four different topics to learn more or
less simultaneously.

I've gotten quite far with both OpenGL and Python, but while Python and its
ecosystem initially seemed perfect for the task, I've now discovered some
serious drawbacks. Bad API documentation and lacking code completion (due to
dynamic typing), having to import every module I use in every other module
gets tedious when having one class per module, having to select the correct
module to run the program, and having to wait 30 seconds for the program to
start and obscure the IDE before being notified of many obvious typos and
other mistakes. It gets really annoying really fast. Quite frankly, i don't
get what all the fuzz is about. Lambda functions, list comprehensions etc. are
nice and all, but there's certainly more important things.

So, unless anyone can resolve at least some of these annoyances, Python is
out. C++ is out as well, for obvious reasons, and C# is out, mainly for lack
of portability. This leaves Java and JOGL as an attractive option, but I'm
also curious about Ruby and Groovy. I'd like your opinion on these and others
though, to keep my from making the same mistake again.

The requirements are:

  * Keeping the hell out of my way.
  * Good code completion. Complete method signatures, including data types and parameter names.
  * Good OpenGL support.
  * Qt support is preferable.
  * Object Oriented
  * Suitable for RAD, prototyping
  * Cross-platform
  * Preferably Open-Source, but at least free.


Answer: It seems you aren't mainly having a problem with Python itself, but instead
with the IDE.

_"Bad API documentation"_

To what API? Python itself, Qt or some other library you are using?

_"lacking code completion (due to dynamic typing)"_

As long as you are not doing anything magic, I find that PyDev is pretty darn
good at figuring these things out. If it gets lost, you can always typehint by
doing:

    
    
    assert isinstance(myObj, MyClass)
    

Then, PyDev will provide you with code completion even if myObj comes from a
dynamic context.

_"having to import every module I use in every other module gets tedious when
having one class per module"_

Install PyDev Extensions, it has auto-import on the fly. Or collect all your
imports in a separate module and do:

    
    
    from mymodulewithallimports import *
    

_"having to select the correct module to run the program"_

In Eclipse, you can set up a default startup file, or just check "use last run
configuration". Then you never have to select it again.

_"before being notified of many obvious typos and other mistakes"_

Install PyDev Extensions, it has more advanced syntax checking and will
happily notify you about unused imports/variables, uninitialized variables
etc.

