[Gambas-user] Gambas is slower than Python??
Benoit Minisini
gambas at ...1...
Sun Jan 18 19:08:32 CET 2009
On dimanche 18 janvier 2009, Gareth Bult wrote:
> Conversely, people use GTK bindings in Python .. Why ?!
> I understand that once upon a time it's what there was .. but not any more!
> Development time for Python or C based GUI applications is 50x more than
> the Gambas equivalent (in this instance I don't think the 50 is an
> exaggeration) and it all comes down (really) to the IDE. (IMHO)
>
I don't know if there are some people that have a global view of Gambas. So I
will say that:
- The primary goals of Gambas were simplicity (in the bindings especially),
quick GUI designing and coding.
- Speed was not the goal, but the interpreter in Gambas 3 is optimized (far
less in Gambas 2). But its design is old (I wanted a working one before a
fast one), and now I have ideas to redesign it so that the bytecode is
interpreted faster, maybe twice. But: I have no time. And Gambas usually
spend more CPU time in system libraries and native classes than during the
bytecode dispatching. So what you would win will not very visible!
- The bindings, well, are not bindings: toolkit and libraries API are often
hidden. You can (almost) write a program for GTK+ and switch to QT3, or the
contrary. You can write a program completely independant of the database
backend. So the guy who wants PostgreSQL only can use your program even if
you developed it with MySQL. When the gb.image and gb.cairo components will
be done in Gambas 3, you will be able to display a page of a PDF file with
vector and image drawn on, all being displayed on an OpenGL rotating cube. I
don't know wich other Linux languages will allow that (mixing Cairo, OpenGL,
QT transparently...)
- When I have time, I will merge the database manager in the IDE, and add
features so that the IDE have more support for Web applications (ASP-like
pages integrated with syntax highlighting, maybe support for creating Web
Forms...). That was always the goal.
- The object model of Gambas is specific. It actually allows things that you
cannot do in Java/.Net... and many other object languages, because compiled
bytecode files are entirely linked at runtime. Then you can do things like
extending a native class (the Application class has more methods, depending
on the components you use), overriding it and change its behaviour (you can
redefine the TextArea class and add it an automatic completion feature based
on a dictionnary, like a cellphone does when you type SMS), use classes from
a component that is not necessarily checked in the IDE (The Settings class
can take the geometry of a Window and put it in the settings file without
requesting a gui component). This feature is used in many, many places in the
IDE and in components.
In other words, maybe it is silly to say, but I made Gambas to have a language
that have features not found in other languages, that allowed me to program
Gambas. :-)
--
Benoit Minisini
More information about the User
mailing list