From: Samuele P. <ped...@st...> - 2005-06-04 01:05:39
|
Ilia Iourovitski wrote: > Probably the "right" way to implement generators in > Jython is through continuations. > Cocoon team have done it for JavaScript so it is > possible. > we have generator support compiling to bytecode. No dice expressing that reasonably as java *source* code. > http://kasparov.skife.org/blog-live/src/java/cont-jsr.writeback > > Thanks, > > Ilia > > --- Mark Stang <ma...@ma...> wrote: > > >>Just because Java doesn't have a goto, doesn't mean >>the JVM doesn't have >>one... >> >>regards, >> >>Mark >> >>On Fri, 2005-06-03 at 18:19 +0200, Samuele Pedroni >>wrote: >> >> >>>Darren Platt wrote: >>> >>> >>>>I remember a little of the discussion at the >> >>time and I think >> >>>>maintainability was a big part >>>>as well - easier to let someone else track byte >> >>code changes and >> >>>>easier to debug. >>> >>>well, I have fixed some serious bugs in jythonc >> >>and can guarantee that >> >>>is not that easy to mantain. >>>Anyway we need a direct compiler to bytecode for >> >>the "intepreter". >> >>>>I love jythonc, >>>>would be great to see it continue to evolve >> >>since it greatly eases >> >>>>deployment and gets people over the >> >>psychological >> >>>>hurdle that they are running python not java, >>>> >>> >>>well one problem is that java has no gotos, this >> >>is a problem for >> >>>generated code, there's a reason why even Common >> >>Lisp >> >>>has something like TAGBODY. So implementing >> >>generators as compilation to >> >>>java is not reasonably achievable. >>> >>>Anyway if someone has spare cycles to spend on >> >>Python to java >> >>>compilation, it would make much more sense to him >>>to spend them on java backend for PyPy. While it >> >>would deal direcyly >> >>>only with a subset of Python there would be some >> >>possible >> >>>real speed gains (jythonc produced code is not >> >>better than the >> >>>interpreter one) and an easier way to write >> >>extensions for Jython. >> >>> Of course the issues of generated code and gotos >> >>would crop up again... >> >>> >>> >>> >>> >>>>Darren >>>> >>>> >>>>>>From what I've heard and seen in the code, >> >>this appears to be the >> >>>>>>start of a more ambitious compiler structure >> >>(think shades of pypy) >> >>>>>>that got to a working stage but didn't really >> >>get much further off the >> >>>>>>ground. >>>>>> >>>>> >>>>>That's more than I know. >>>>> >>>> >>>> >>>> >>>> > ------------------------------------------------------- > >>>>This SF.Net email is sponsored by Yahoo. >>>>Introducing Yahoo! Search Developer Network - >> >>Create apps using Yahoo! >> >>>>Search APIs Find out how you can build Yahoo! >> >>directly into your own >> >>>>Applications - visit >>>> >> > http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 > >>>>_______________________________________________ >>>>Jython-dev mailing list >>>>Jyt...@li... >>>> >> > https://lists.sourceforge.net/lists/listinfo/jython-dev > >>> >>> >>> >>> > ------------------------------------------------------- > >>>This SF.Net email is sponsored by Yahoo. >>>Introducing Yahoo! Search Developer Network - >> >>Create apps using Yahoo! >> >>>Search APIs Find out how you can build Yahoo! >> >>directly into your own >> >>>Applications - visit >> > http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 > >>>_______________________________________________ >>>Jython-dev mailing list >>>Jyt...@li... >>> >> > https://lists.sourceforge.net/lists/listinfo/jython-dev > >>-- >>Mark Stang <ma...@ma...> >> |