On Wed, Apr 22, 2009 at 2:48 PM, Maciej Fijalkowski <fij...@gmail.com> wrote: > JS backend is translating restricted subset of Python called RPython. > This seems to be infeasible, since JS is truly a dynamic language,
yes. the features of javascript are a near one-to-one match with python. the only things that are "truly" missing are the int / float bugbear (which can be emulated, i realise, but in a _very_ expensive way), read-only attributes (slots) but even that could be [expensively] emulated, and "undefined" tends to get in the way a lot. > that's why we removed it. The other reason why we removed it, is that > noone seems to be interested enough in maintaining it. oh. arse. well, i have to say: if pypy was in a position to do the same job as pyjamas, i'd be using pypy, not pyjamas. and would end up maintaining it (just like i've ended up maintaining pyjamas, because i need it, and use it). > As far as I know pyjamas does not translate a subset of python, correct. we're going for as much of python2.N as we have time for, with a view to (eventually) making pyjs a JIT python accelerator (using V8 as the JIT engine) - just like psyco and unladen/swallow. > but > pythonized javascript - ie it does not preserve python features, but > rather tries to implement python syntax which is javascript at the > bottom. for web developers, it preserves as many python features in their entirety as web developers can stand. int/float got sacrificed, because that really _is_ too tricky to handle / too expensive to do "strictly". everything else, we're going for preserving / implementing python features as much as possible, simply because people need it. however there's a separate experiment - "strict mode" - which will involve doing a python "int" class and a python "long" class etc. etc. that implement the full semantics. l. _______________________________________________ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev