tag:blogger.com,1999:blog-741750605858169835.post2493438108588796474..comments2024-01-24T14:53:02.919+00:00Comments on Stephen Colebourne's blog: JDK 7 language changes - JavaEdge votes!Stephen Colebournehttp://www.blogger.com/profile/01454237967846880639noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-741750605858169835.post-24255075859988612008-12-28T00:23:19.000+00:002008-12-28T00:23:19.000+00:00Null handling:
http://lasu2string.blogspot.com/200...Null handling:<br />http://lasu2string.blogspot.com/2008/12/null-handling-small-language-changes-on.html<br /><br />For-each loop:<br />http://lasu2string.blogspot.com/2008/12/for-each-loop-small-language-changes-on.htmlLasu -Marek Kozie?-http://lasu2string.blogspot.com/noreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-24395035533347321802008-12-26T18:21:03.000+00:002008-12-26T18:21:03.000+00:00Hello!
I will describe my opinion about this chan...Hello!<br /><br />I will describe my opinion about this changes.<br />String switch:<br />http://lasu2string.blogspot.com/2008/12/string-switch-small-language-changes-on.html<br />Hope u will give yours opinion as well.<br /><br />Greeting!Lasu -Marek Kozie?-http://lasu2string.blogspot.com/noreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-64763184203136877952008-12-24T08:53:57.000+00:002008-12-24T08:53:57.000+00:00I see where you guys are coming from. Theoreticall...I see where you guys are coming from. Theoretically it would be better not have a null value at all. Unfortunately we have it, and we have to deal with it. <br /><br />In my projects I always try not to produce null values, I procude empty lists or other null-pattern-objects. But what about co-coders? The bigger the project, the likely it is that I will encounter a null value where there should not be one.<br /><br />Consider the following example:<br /><br />User user = userManager.getUser(userName);<br />if (user == null) return;<br />History history = user.getHistory();<br />if (history == null) return;<br />history.print(out);<br /><br />Again, I know, it is bad that there are potential null values here, but I have to deal with it.<br /><br />The following code is much more readable and does not loose any information in this case:<br /><br />History history = userManager.getUser(userName).?getHistory();<br />if (history == null) return;<br />history.print(out);Fatih Coskunhttp://coskunscastle.blogspot.comnoreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-43466170996706631232008-12-23T19:03:04.000+00:002008-12-23T19:03:04.000+00:00Stephen: We really appreciate that you have the p...Stephen: We really appreciate that you have the passion and, critically, free time to gather and digest this kind of information for the Java community. I wish we had someone with your passion and free time to complete the Java Time API (JSR 310) for SE 7. Alas, we each have to set priorities.Neal Gafterhttp://www.javac.infonoreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-33310550271956955332008-12-23T13:14:12.000+00:002008-12-23T13:14:12.000+00:00O reified generics, where art thou ?
This is one ...O reified generics, where art thou ?<br /><br />This is one of the top priority to remove tons of boiler plate codes (think JAX-WS/B/..., think JSF/EL, think Swing/JavaFX data binding ...).<br /><br />We do need reified generics with good genericity access to it !testmannoreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-2609149159412852392008-12-22T01:55:17.000+00:002008-12-22T01:55:17.000+00:00I agree. Null-handling strikes me as one of the wo...I agree. Null-handling strikes me as one of the worst features to add to the language. Adding compile-time checking for nullability is one thing, adding a null-handling operation is another. I am strongly against the latter.Gilihttp://www.desktopbeautifier.com/noreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-90447337298895080862008-12-21T21:47:54.000+00:002008-12-21T21:47:54.000+00:00Great work, Stephen! Thanks!
However, it unfortu...Great work, Stephen! Thanks! <br /><br />However, it unfortunately escapes me why null-handling is so popular. I totally agree with Charles Nutter on this matter. Furthermore, I just don't see any real use case for this ... yet. I mean if you have something like 'Object d = a.?b.?c;' to forego your null-checking then I assume that d is assigned null if any call on the RHS returns null. That'd mean that null is a valid value for some operation on the RHS. That, in my opinion, should rarely be the case or at least dealt with explicitly rather than hiding it in syntax. Furthermore, now you have to deal with d potentially being null. Well, it all seems a bit strange and error-prone to me; not to forget, as Charles mentions, the "problem" you'd have with assignments to primitve types. But if someone comes up with some compelling use cases, I'll reconsider my position ;)<br /><br />Cheers, MartinMartin Dobmeiernoreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-19776118048376614722008-12-21T14:12:56.000+00:002008-12-21T14:12:56.000+00:00I imagine that there are no people who would comme...I imagine that there are no people who would comment here and not like to see closures or properties in java.<br /><br />Among the changes above I like the null-handling most, and dislike the ones most which could be implemented as API if closures were there (i.e. ARM and enhanced loops).Fatih Coskunhttp://coskunscastle.blogspot.comnoreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-18797776613200261872008-12-21T12:09:28.000+00:002008-12-21T12:09:28.000+00:00Hi Stephen I really hope some changes make it, but...Hi Stephen I really hope some changes make it, but it feels like we're discussing changes for too long now and that Java 7 isn't going to get much features anyway. I think I would appreciate most of these proposals, and even more so closures and properties.Peternoreply@blogger.com