Git Product home page Git Product logo

py2scala's People

Contributors

benwing avatar

Watchers

 avatar

py2scala's Issues

Employ AST (Abstract Syntax Tree)

This is a Improvement Request or Feature Request, if you will.

IMHO, the program should employ AST instead of parsing text
    http://docs.python.org/2/library/ast.html

You just have to ask Python to load the program to be converted.
Python will return an AST for the program loaded.
Then you visit the tree and generate Scala code.

Original issue reported on code.google.com by [email protected] on 21 Nov 2013 at 5:11

Convert Python generators

This is an Improvement Request or Feature Request, if you will.

Python generators are amazing for certain kinds of applications, in particular 
those which involve some sort of delay for every chunk of information, like 
typically applications consuming data from the web or other resources from the 
network.

Scala continuations is the closest thing to Python generators.
Unfortunately, Scala continuations require a lot of boilerplate to be a viable 
solution. This article in SO explains how Python generators can be replaced by 
Scala continuations:
   http://stackoverflow.com/questions/7303166/preferred-way-to-implement-yield-in-scala/11277282#11277282

Notice that Scala continuations are substantially different from Python 
generators, which means that not all converted code will work as expected or 
even compile, I guess.

Original issue reported on code.google.com by [email protected] on 21 Nov 2013 at 5:16

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.