Martin C. Martin wrote: > In RPython, you can't call into other libraries, be they C or Python. > Also, calling RPython from Python is "pretty unofficial and > unsupported." Given that much of modern programming centers around > connecting various libraries together, this makes RPython a poor choice > for most practical work. > You can call C libraries from rpython. There is even a doc here http://codespeak.net/pypy/dist/pypy/doc/rffi.html. Calling from Python to RPython is indeed pretty troublesome. > At the moment, the most straight forward way to learn RPython is to > learn Python, then learn the restrictions of RPython, since RPython is a > subset of Python. The easiest way to do this is, basically, keep > writing Python and seeing what the translator will and won't accept. > > Please correct me if I'm wrong; I've only spent a few days looking at > RPython. > > Best, > Martin > I think this is bad decision. Especially that translator might accept something and start behaving differently. Some docs are here http://codespeak.net/pypy/dist/pypy/doc/coding-guide.html#rpython, but it's indeed hard to deal with. RPython is similiar to C++ in a sense that one can write books about tricks. The main strangeness is that RPython is constructed out of live objects, which means that during initialization all python dynamism is allowed, but not after. This is sometimes hard to follow and also it's evolving a bit in time. I would suggest looking at various smaller language implementations (lang/ subdirectory in svn) and come to #pypy on freenode and ask. But it would be better if you have good reason why exactly you want to use it.
Cheers, fijal :. _______________________________________________ [email protected] http://codespeak.net/mailman/listinfo/pypy-dev
