Skip to content

Instantly share code, notes, and snippets.

@xbony2
Last active August 29, 2015 14:19
Show Gist options
  • Save xbony2/3e8bc1bc0bea00edf563 to your computer and use it in GitHub Desktop.
Save xbony2/3e8bc1bc0bea00edf563 to your computer and use it in GitHub Desktop.

Stuff that is planned for Java 9:

  • Project Jigsaw: a Java Module System
  • Money Currency API
  • JSON API
  • HTTP 2 Client
  • Smart Compilation
  • Process API improvements
  • HTML 5 Javadocs and Unicode 7.0
  • JNI 2.0 (yes please)

My wishlist:

  • Optional braces for one-statement methods. Such that:
public int getEnergy(){
	return energy;
}

Can become:

public int getEnergy()
	return energy;

Why not? I feel that they aren't needed always.

  • YAML API - because nobody really like JSON, or XML.
  • Optional Semicolons - although this is unlikely to be added, I still want it! Come on Java, join the Cool Cids Club! Play with your buddies! Scala, Swift and Javascript will love ya! (You can't tell me nuthin', semicolons in JavaScript are 100% optional, fuck anyone who says otherwise :P). Pretty please? It's not 1995 anymore.
  • Native Regex support would be interesting.
  • Ruby-style default parameters. If you've had the fun of using these, you'd agree with me :P For example:
public BrainfuckProgram(String code){
	super(code, 1000);
}

public BrainfuckProgram(String code, int cellSize){
	super(code, cellSize, 1000);
}

public BrainfuckProgram(String code, int cellSize, int arraySize){
	//does stuff
}

Could be easily simplified to:

public BrainfuckProgram(String code, default int cellSize = 1000, default int arraySize = 1000){
	//does stuff
}

It's up for debate if the default keyword is required or not though, but I personally believe it looks more natural.

  • Import aliases (cough Dyvil). For all those IWrench a**holes :P
import redmagic.api.items.IWrench as IWrenchRM;
import wasliecore.interfaces.IWrench as IWrenchWC;
import hydrocraft.api.IWrench as IWrenchHC;
  • Multiline strings. This is common in newer languages, such as Golo.
public static final String licnese = ""THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment