Is it possible processing replace python, c# and java in the future?

edited November 2016 in Hello Processing

Given extended libraries and bigger community is there a chance that processing overpower other interpreted languages?

Answers

  • Processing is not a programming language. It is just a library(along with a bunch of other processing based libraries) in Java (there are versions of Processing for other programming/scripting languages like Python and Javascript, and maybe unofficially even others). In its core, Processing is nothing but Java (or the corresponding language.. Hence, it couldn't possibly replace Java(or any other programming language). It could, however, replace other OpenGL based graphics libraries(though not OpenGL itself).

  • edited November 2016
    • In order to provide support for another language, the whole Processing API needs to be re-written for it! #:-S
    • AFAIK, Processing was written for 2 languages only: Java & JavaScript.
    • And for JS, there are 2 actually: Pjs (JavaScript & CoffeeScript Modes) & p5.js! :bz
    • And of course, the famous Android Mode, which is very much Java. :P
    • There are many other "modes" for Processing, but they all rely on Java's VM.
    • Some JVM languages supported by Processing's API:
    • Python (Jython), Ruby (JRuby), Quill (Clojure).
    • There are also some Processing-inspired libraries, for example: openFrameworks.
    • And even Processing-inspired IDEs: Arduino (AIDE) for example.
  • Oh, I didn't know that processing Python mode used the Java VM. But isn't it funny? What is the whole point? What happens behind the scenes when someone uses processing.py?

  • AFAIK, Android itself is based on Java.

  • edited November 2016

    Up to Android 4.4 "KitKat", it was based on Dalvik VM.
    Which is a modified clone of Java 6 w/ an incomplete Java standard API: ~O)
    https://en.Wikipedia.org/wiki/Dalvik_(software)

  • edited November 2016

    What happens behind the scenes when someone uses processing.py?

    Well, the Python source is compiled in Java's bytecode.
    Otherwise, it couldn't invoke Processing's API, which is written in Java. 8-|

  • edited November 2016

    Processing.py has an interesting history, discussed on its homepage readme. It is built on the Jython Project, which (among other things) supports dynamic compilation of python source code to Java bytecodes.

    Edit: Jython used to be a source-to-source compiler, transcompiler or transpiler to Java, and now compiles directly to JVM bytecode. In any case, when using Jython you can write in Python, but you can run Java bytecode that is able to hook up with the rest of the Java libraries in the Processing ecosystem.

  • Also, @uvlight --

    Processing will never replace one of the "big languages" because that is not its goal -- the different versions of Processing are more like dialects written in the big languages, primarily Java but also with Javascript, Python, and Ruby "modes". Languages with a specific focus and purpose are sometimes called "domain-specific languages" -- for Processing this is the quite wide domain of art (graphics, sound, interactivity, and creative computing).

    Still, by learning Processing you are learning principles of programming that work similarly in related programming languages for general use, including many of the C-family programming languages such as Java, C++, C, and Objective C.

  • To be pedantic (aaargh, the pedants are revolting)

    @uvlight - neither Java or C# are really interpreted languages.

    @jeremydouglass - Jython isn't transpiled (anymore) - Python code is compiled directly to JVM bytecode.

  • @neilcsmith_net However take note that they are interpreted languages to some extent because Java is translated to bytecode which behaves like machine code to a virtual machine. That is why most people don't really differentiate between them.

  • @Lord_of_the_Galaxy Leaving aside the fact that languages themselves are neutral - there's not really any such thing as a compiled or interpreted language. Java and Processing code is normally distributed as bytecode not source code, therefore it is pre-compiled. That the JVM might interpret or JIT compile bytecode, does not make Java in that scenerio an interpreted or JIT compiled language. It's a pedantic, but also quite key (if you make the tools I do), distinction.

  • @neilcsmith_net -- edited re:Jython, thanks.

    Also, I appreciate the important hair you are splitting about there being no "interpreted languages" in the strict sense.

    However: beginners still need to understand that the phrase "interpreted language" is common, and is commonly understood to mean: "an interpreted language is a programming language for which most of its implementations execute instructions directly"....

  • Let's just agree that bytecode is a hybrid between interpreted & compiled languages. :P

  • @jeremydouglass actually I didn't want to get into the hair splitting, hence didn't mention bytecode to start with. I agree with you that beginners need to understand that common definition. Java / Processing doesn't fit that common definition! That's what I was trying to say to the OP.

    I agree with @GoToLoop that the reality is a big grey area in between. Of course, then there's Jazelle :-D But that's enough of that.

  • I agree with @GoToLoop too.
    @neilcsmith_net I'm not trying to prove you wrong, rather, I'm just telling you why most people don't really know that Java is not an interpreted language.

Sign In or Register to comment.