Ideally I’d like to learn Java 11, and I’d keep an eye on the differences between that and Java 8 for now, until P v4 releases.
A general comment about the possibilities changing in Processing 4.
Processing uses a preprocessor and an underlying built-in Java version, so new Java language features in Processing depend on two things:
- what is the underlying Java?
- can new language syntax features pass through the preprocessor?
For example, Processing 3 uses Java 8, but it is a known issue that the ANTLR preprocessor implementation is still largely Java 6-ish era, and does not support some of the Java 7 and 8 languages features such as:
- binary literals
- diamond operators
- lambda expressions
- Strings in switch statements
- underscores in numeric literals
Note that this doesn’t impact new and updated classes and methods – for example, import java.util.Optional
works just fine in Processing 3, even though Optional was added in Java 8. It is only new syntax that is an issue.
This is a quick version history of some major Processing releases and Java releases.
date |
Processing |
Java |
2020-01 |
Processing 3.5.4 |
|
2018-09 |
|
Java SE 11 (LTS) |
2018-05 |
|
Java SE 10 |
2017-09 |
|
Java SE 9 |
2015-09 |
Processing 3.0 |
|
2014-07 |
Processing 3.0a1 |
|
2014-07 |
Processing 2.2.1 |
|
2014-05 |
|
Java SE 8 |
2013-06 |
Processing 2.0 |
|
2011-09 |
Processing 2.0a1 |
|
2011-07 |
|
Java SE 7 |
2011-05 |
Processing 1.5.1 |
|
2011-04 |
Processing 1.5 |
|
2010-07 |
Processing 1.2 |
|
2010-03 |
Processing 1.1 |
|
2008-11 |
Processing 1.0 |
|
2006-12 |
|
Java SE 6 |
2005-07 |
Processing beta |
|
2004-09 |
|
Java J2SE 5.0 |
2002-02 |
|
Java J2SE 1.4 |
2001-08 |
Processing 0003 |
|
2000-05 |
|
Java J2SE 1.3 |
I believe that Processing was started on Java 1.3, Processing 1 and 2 were on Java 6, Processing 3 on Java 8 … and Processing 4 will be on OpenJDK 11.
Processing 4 may support many / most of this new syntax (that is, syntax from the above list of Java 8 features by virtue of its updated preprocessor, as well as additional Java 9, 10, and 11 language features (such as var
). The alpha release is available here:
In addition to books and classes, it might be useful to think about the paradigm shifts by browsing overviews of major feature changes on the upgrade path – for example, 6-8, and 8-11.