I had heard a rumor that there ware talks of user defined value types. Does anyone know if there is any hope for this?
Java 9 features announced
21–30 of 228 posts
Re: Java 9 features announced
#22The lack of an official JSON API has been a huge sore point for quite some time and has spawned dozens of libraries re-implementing the same thing over and over (GSON, Jackson, and even my own nanojson). I do hope that we avoid the DocumentBuilderFactory mistakes of XML and just end up with One True JSON implementation this time.
Re: Java 9 features announced
#23a new json api to be released 2016. Hopefully by that time json is still relevant. I know most likely it will but at the pace of change that tech has, im not betting. is there any contender to json at the moment?
For other message protocols it's a different story. Each system has its own needs, so it's much harder to say.
Re: Java 9 features announced
#24Re: Java 9 features announced
#25I'm deeply missing hot swapping. I believed it could be included in java 9 but i think we have to wait...
Re: Java 9 features announced
#26Re: Java 9 features announced
#27a new json api to be released 2016. Hopefully by that time json is still relevant. I know most likely it will but at the pace of change that tech has, im not betting. is there any contender to json at the moment?
JSON somewhat replaced XML, but that made sense since XML is more complex and a lot more expensive (both in terms of network AND processing).
I can see people building more complex obstractions on top of JSON in the next for years (essentially re-building what XML was, but in JSON) however I cannot really see JSON being entirely dethroned for what it is good at.
Re: Java 9 features announced
#28Nothing pollutes java source more than getters and setters. I can't believe this still isn't being address. Wish they'd move in the direction Groovy has in this regard.
public class Foo { public readable int canSeeeMeButCantChange; public writeable int cantReadMe; public int existingBehavior; }
These are pretty simple changes to the compiler and verifier. You would make canSeeeMeButCantChange an invalid "left hand" variable in the compiler, and the verifier would have to check for any writes to the fields. cantReadMe would be an invalid right hand variable, and a similar check for the verifier. Any other public field behaves as normal.
Re: Java 9 features announced
#29I had heard a rumor that there ware talks of user defined value types. Does anyone know if there is any hope for this?
It seems that it is almost in prototyping stage, the usual suspects have already written a sketch of a future proposal: http://cr.openjdk.java.net/~jrose/values/values.html
Re: Java 9 features announced
#30Nothing pollutes java source more than getters and setters. I can't believe this still isn't being address. Wish they'd move in the direction Groovy has in this regard.
Amen. How about some language keywords like "readable" and "writeable"? public class Foo { public readable int canSeeeMeButCantChange; public writeable int cantReadMe; public int existingBehavior; } These are pretty simple changes to the compiler and verifier. You would make canSeeeMeButCantChange an invalid "left hand" variable in the compiler, and the verifier would have to check for any writes to the fields. cantR…
Integer val = some.other.chain.of.objects.value;
In Java, this code has a huge potential for NullPointerExceptions. Instead a new operator (yes, I know) like:
Integer val = some.?other.?chain.?of.?objects.?value;
If any of the intermediate objects are null, the whole assignment becomes null. This could be done with a smarter compiler (easy way), or a new JVM bytecode (probably 'better' but not easy).