On Apr 22, 2009, at 4:47 PM, Luke Kenneth Casson Leighton wrote:

>> Alternatively, if we talk about a subset, the criteria is that *if*  
>> my
>> program runs it *needs* to give the very same results (if it  
>> doesn't...
>> well, that's why it's a subset :-)).
>
> well, pyjamas came "from" the area of web development (where the
> merged/subset stuff doesn't matter and is actually desirable).
>
> and i just wanted to emphasise to you that, from experience, the
> "good enough" really _is_ good enough, for web developers' purposes -
> and that you should talk much louder and make a much bigger deal of
> the javascript back-end than is currently being made.
>
> if you can add in "assembly-level-like" infusion, where javascript
> snippets can be substituted directly into the resultant javascript
> output, then you are on to a winner.  the pyjamas compiler uses this
> technique to directly interface with the DOM model of the browser.

I'm not going to comment on the merits of this (I actually think  
javascript is a better language to write javascript code in), but if  
this is exactly what pyjamas is doing, why would we want to do it on  
pypy?


> however i believe that it would be relatively easy to go from this
> "good enough" / "relaxed" mode to "full python compliance" - the
> "strict" mode as i call it.


Exactly how? How do you map real python to javascript without killing  
the performance gain any js interpreter is going to give you? Maybe in  
the future there is going to be a pypy python interpreter running on  
top of js but without jitting I guess the performance is going to be  
at maximum in the same level of cpython... which is interesting  
(having a full python interpreter to run on the client) but not for  
performance reasons.

The way I see real python semantics on javascript is creating a python  
interpreter in javascript and having tons of checks everywhere (after  
each math operation for instance) to garantee the same behaviour of  
cpython.

In the end I think that this "relaxed mode" is much more on how Boo  
works and shold be named as such (naming the language PythonScript or  
something) to avoid confusion. This mode would have to somehow change  
the python sintax at least to support messing with prototypes or you  
are hidding one of the few interesting aspects of the JS language. And  
the separation from the "relaxed" to "stric" is so big that it should  
be explict everywhere.


--
Leonardo Santagada
santagada at gmail.com



_______________________________________________
pypy-dev@codespeak.net
http://codespeak.net/mailman/listinfo/pypy-dev

Reply via email to