Re: Why GNOME uses C?
- From: James Henstridge <james jamesh id au>
- To: Peter <volkov_peter list ru>
- Cc: gnome-devel-list gnome org
- Subject: Re: Why GNOME uses C?
- Date: Thu, 16 Jun 2005 14:31:53 +0800
Peter wrote:
>But what was very strangely for me that there were advices to program for
>gnome in Python or C#. IIRC these languages do not need their
>programs to be compiled (sorry I fogot the right term) to run them. So
>this are the different languages, and if we want fast program (desktop)
>it's better to avoid such languages. Did I miss anything? So why there
>were such advices?
>
>
If you take a look at your average GUI program, you will find that they
are idle 99% of the time. They are waiting on events telling them
things like:
* the user pressed a key on the keyboard
* the user pressed a button on the mouse
* the mouse moved
* a certain area of the window needs to be repainted
* etc
Interpreted languages like Python can sit doing nothing just as
efficiently as C programs for the most part, so it works quite well for
desktop applications.
That isn't to say that there aren't cases where the speed difference
between C and Python is a problem. However if you run into such a
situation, it is possible to rewrite the time-critical section in C, and
make it available as a Python extension (chances are that you won't need
to do this though ...)
James.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]