Pyrex and refcounts (Re: unladen swallow: python and llvm)

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Mon Jun 8 22:02:19 EDT 2009


Greg:

>Can you elaborate on those problems?<

I can't, I am sorry, I don't remember the details anymore.
Feel free to ignore what I have written about Pyrex, lot of people
appreciate it, so it must be good enough, even if I was not smart/
expert enough to use it well. I have even failed in using it on
Windows for several days, so probably I am/was quite ignorant. I use
Python also because it's handy. For programmers being lazy is
sometimes a quality :-)

-----------------

This part is almost OT, I hope it will be tolerated.

Neal Becker:

>Is Pyd maintained?  I'm interested, but was scared away when I noticed that it had not been updated for some time.  (I haven't looked recently).<

I think Pyd works (with no or small changes) with a D1 compiler like
DMD, but you have to use the Phobos Standard library, that is worse
than Tango. If you have problems with Pyd you will probably find
people willing to help you on the D IRC channel.

The problem is that the D language isn't used by lot of people, and
most libraries are developed by few university students that stop
mantaining the libraries once they find a job. So most D libraries are
almost abandoned. There is just not enough people in the D community.
And some people don't like to develop new libs because the D2 language
(currently in Alpha still) makes D1 look like a dead end. On the other
hand this is also a good thing, because D1 language has stopped
evolving, so you are often able to compile even "old" code.

Using Pyd is quite easy, but D1 language is not as simple as Python,
despite being three times simpler than C++ :-) The good thing is that
it's not difficult to adapt C code to D, it's almost a mechanical
translation (probably a tool simpler than 2to3 can be enough to
perform such translation of C to D, but of course no one has written
such thing).

Another problem with Pyd is that it may have scalability problems,
that is it may have problems if you want to wrap hundreds of classes
and functions. So before using it for real projects it's better to
test it well.

I have no idea if D will ever have some true success, even if it's
nice. The hystory of Informatics is full of thousands of nice dead
languages. In the meantime I'll keep using it and writing libs, etc. I
have seen than several Python-lovers like D. The new LDC compiler
allows D1 code to be most times about as fast as C++. This is more
than enough. At the moment it seems that D is appreciated by people
that write video games.

Bye,
bearophile



More information about the Python-list mailing list