[OT] Python like lanugages [was Re: After C++, what with Python?]

Stefan Behnel stefan_ml at behnel.de
Tue Jan 18 02:31:26 EST 2011


Tim Harig, 17.01.2011 20:41:
> In comp.lang.python, I wrote:
>> Tim Harig, 17.01.2011 13:25:
>>> If I didn't think Python was a good language, I wouldn't be here.
>>> Nevertheless, it isn't a good fit for many pieces of software where a
>>> systems language is better suited.  Reasons include ease of distribution
>>> without an interpeter, non-necessity of distributing source with the
>>> product, ability to leverage multiple CPU and multicore systems, and
>>> simple sequential performance.
>>>
>>> Given that Python does't work well in many areas, we could just give up
>>> and accept having to write C++ for our day jobs or we can look for a
>>> language which bridges the gap between those tasks that require C++'s
>>> level of control and those which work well for dynamic languages.
>>> Java attempted to do that, and has the market share to show that the
>>> concept works, but I think that it missed the mark for many needs.  It is
>>> still much lower level then Python for purposes of rapid developement
>>> and too slow to be competative for non-long-lived tasks.
>>
>> So seriously need to take a look at Cython.
>>
>> http://cython.org
>
> One of the arguments for Python has always made is that you can optimize
> it by writing the most important parts in C.  Perhaps that is a crutch
> that has held the communty back from seeking higher performance solutions
> in the language itself.

The good news with Cython is that you no longer need to "write the most 
important parts in C". Instead, you type them statically and compile them. 
You don't even need to sacrifice Python source compatibility for that. So 
you get the best of Python at the speed of C (or 'c', as some would say ;).


> I prefer a single language as opposed to a creolization of two.

With the possible exception of Lisp, I find it hard to think of a language 
that's still alive and not the creolisation of (at least) two other 
languages. They all inherited from each other, sometimes right from the 
start ("lessons learned") and always during their subsequent life time.


> I certainly don't need to require anybody who
> wants to use a program I have compiled to install an interpreter.

You will be happy to hear that you can link Cython programs against 
libpython (even statically) to build an executable that embeds the 
interpreter for you. Besides, on most operating systems, installing a 
dependency is done automatically, and Go code doesn't run natively on 
Windows either, without first installing and running the compiler over it.

Stefan




More information about the Python-list mailing list