Python in a desktop environment

Bruno Desthuilliers bruno.42.desthuilliers at wtf.websiteburo.oops.com
Tue Mar 13 04:55:34 EDT 2007


David Cramer a écrit :
> On Mar 12, 9:56 am, Bruno Desthuilliers <bruno.
> 42.desthuilli... at wtf.websiteburo.oops.com> wrote:
>> Diez B. Roggisch a écrit :
>>
>>> Bruno Desthuilliers wrote:
>>>> Grant Edwards a écrit :
>>>> (snip)
>>>>> Python is _far_ more robust than C++.
>>>> I wouldn't say so - robustness is a quality of a program, not of a
>>>> language !-)
>>> Nope. Dealing with dangling references and double frees, complex
>>> copy-semantics that change only by a feeble character or via overloaded and
>>> thus hard to comprehend assignment operators are all properties of C++,
>> Indeed
>>
>>> and
>>> tremendously afflict robustness IMHO.
>> robustness of programs written with this language, yes.
>>
>> NB : I'm afraid the smiley got lost somewhere between screen and
>> readers, so here comes another one !-)
> 
> Everyone seems to have misunderstood what I want.

Possibly.

> I'm a Python
> developer, I don't give a rats ass about what people say about C#,
> Python, or c++, they all have their uses. My main reasoning for
> considering C++ as the backend is some things (reading memory for
> example) are much easier to do in C++ than in Python,

Depends. But anyway nothing prevents you from having a few functions in 
a C extension for this part...

> and we already
> have a lot written in C++.
 >
> The argument about robustness, has nothing to do with how nicely
> formatted the language is, or how great the tracebacks are,

Certainly not. It has to do with readability (which helps spotting 
obvious bugs), simplicity (which helps understanding the whole damn 
thing), and automatic memory management (which really makes a 
difference, even for seasonned C and C++ programmers).

> it's
> strictly about how high the memory cost is and how much CPU it's going
> to take. 

This is a performance issue, not a robustness issue. Wrong qualificative !-)

> Python is well known for being high on memory and C++ being
> compiled can be a lot faster for things.

Even compiled to native code, Python wouldn't probably be much faster - 
it's way too dynamic. Or this would require 30+ years of work (like 
we've seen for Lisp).

If you have performance-critical parts that can't be solved by a 
pure-python solution or a binding to an external lib, then yes, it makes 
sens to recode these parts in a lower-level language. But this is not 
exactly "a python front-end for a C++ backend", it's "a python program 
with some C or C++ extensions".

My 2 cents...



More information about the Python-list mailing list