tag:blogger.com,1999:blog-741750605858169835.post6777472427449078363..comments2024-01-24T14:53:02.919+00:00Comments on Stephen Colebourne's blog: JDK 7 language changes - Everyone votes!Stephen Colebournehttp://www.blogger.com/profile/01454237967846880639noreply@blogger.comBlogger15125tag:blogger.com,1999:blog-741750605858169835.post-69822200161953267702017-08-28T20:58:08.970+01:002017-08-28T20:58:08.970+01:00Such argument is just a bugbear theory. In contras...Such argument is just a bugbear theory. In contrast the reality is huge amount of code like 'expression == null ? null/default : expression'.<br />I would give adult users freedom of choice and help rather then restrictions and complications.<br />Thx for help!jajahttps://www.blogger.com/profile/14445571267462030838noreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-46006361769089361292009-02-15T20:34:46.000+00:002009-02-15T20:34:46.000+00:00Neal, At no stage have I said that voting on langu...Neal, At no stage have I said that voting on language changes should be decisive, however it is a very useful way to gather feedback on what is, and is not, causing pain to developers.<br /><br />For example, list/map access using array syntax was consistently lowly ranked, yet it is being seriously considered for Java 7. This voting exercise means that Sun needs to explain very clearly now as to why a lowly ranked/disliked proposal such as that should be included.<br /><br />I find your comment on bias, however, pretty objectionable. The raw data is available for each vote, and the graphs are no more than a visual view of the data. Yes, I have added a small amount of commentary, but anyone looking at the graphs would come to the same conclusion - I've not made anything up here.<br /><br />Now, it so happens that I believe the number of problems seen in production from NPEs is clear evidence of the need for better null handling in Java. The votes clearly and unambiguously show that many other developers feel the same pain (almost 50% of voters at JavaEdge placed null-handling in their top two of out of ten choices). I've been pro-active and proposed a solution. If you don't like it, then don't just whine - propose an alternative (or explain why we should all carry on putting up with NPEs in production).Stephen Colebournenoreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-80697100207485672992009-02-15T16:07:31.000+00:002009-02-15T16:07:31.000+00:00Stephen: Although public polling is among the wors...Stephen: Although public polling is among the worst possible methods of language design, your untiring efforts in digesting these statistics has produced an interesting demonstration of the effect of author bias. I wish the Java community had someone with the same level of commitment to complete the jsr310 Date and Time implementation for Java SE 7.Neal Gafternoreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-11678580942999618572009-02-09T12:03:32.000+00:002009-02-09T12:03:32.000+00:00My very small language change wish:
not throwing a...My very small language change wish:<br />not throwing a NPE with a null Iterable when using the enhanced for loopOlivier Allouchhttp://www.illicotravel.comnoreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-36555382695876286122009-02-04T13:58:52.000+00:002009-02-04T13:58:52.000+00:00Some of you may want consider sample String-switch...Some of you may want consider sample String-switch workarounds:<br />http://lasu2string.blogspot.com/2009/02/using-strings-and-objects-in-switch.htmlLasu aka Marek Kozielhttp://lasu2string.blogspot.com/noreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-90389689578593097562009-01-28T12:17:55.000+00:002009-01-28T12:17:55.000+00:00@Stephen
I didn't considered this as reading p...@Stephen<br />I didn't considered this as reading problem while JavaDoc is far behind current Java as i already said:<br />http://lasu2string.blogspot.com/2008/12/is-javadoc-killing-program-evolution.html<br />But in destination it would be nice to see support for null-checking and other validators … but I like it only if that would be supported by both: Java and JavaDoc.Lasu aka Marek Kozielhttp://lasu2string.blogspot.com/noreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-47897639923103662162009-01-28T00:51:06.000+00:002009-01-28T00:51:06.000+00:00Mark, I'm not suggesting that the ?: should be...Mark, I'm not suggesting that the ?: should be mandatory.<br /><br />Lasu, I think you're missing the point of handling null. Adding an Eclipse template aids the writing of code, but it doesn't help reading it.<br /><br />Hamlet, You might choose to interpret this as irrelevant, but it was requested by key people in Sun, and to be done in this way. I also think that the results speak volumes, as they are pretty consistent across multiple different sources.<br /><br />Casper, Relatively speaking, few developers use BigDecimal. Of course, this is partly a chicken and egg thing, as its so hard to create one...Stephen Colebournenoreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-7066857315177468072009-01-27T22:48:18.000+00:002009-01-27T22:48:18.000+00:00@Casper Bang
I think for that purpose there should...@Casper Bang<br />I think for that purpose there should be sub-language. Or at leas liblary.Lasu aka Marek Kozielhttp://lasu2string.blogspot.com/noreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-42186910592566972002009-01-27T19:24:59.000+00:002009-01-27T19:24:59.000+00:00Nobody cares about getting decimal literal type? T...Nobody cares about getting decimal literal type? That's surprising and disappointing considering how often this is used and how relatively easy and isolated it would be to burn this into the compiler (compared to much of the other stuff).Casper Bangnoreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-36012338501953114322009-01-27T14:29:24.000+00:002009-01-27T14:29:24.000+00:00All these votes and graphs make a fun read and a f...All these votes and graphs make a fun read and a fun discussion. But nobody really believes they are meaningful, right? I'm not sure the sample of "conference attendees motivated enough to answer a survey or stand at a whiteboard or vote in an online poll" is meaningful. It's a fun way to shape and guide the discussion but is Sun going to use this data for something?Hamlet D'Arcyhttp://hamletdarcy.blogspot.comnoreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-69005081902135689402009-01-27T12:10:02.000+00:002009-01-27T12:10:02.000+00:00I wander why people are so determined for null-che...I wander why people are so determined for null-checking.<br /><br />I admit it was problem for me, but I simply added template:<br />ifnull<br />if (==null){throw new NullPointerException(.class.getSimpleName());}<br /><br />Since then I do not see this as big problem.<br />Other thing is to handle that in JavaDocs....Lasu aka Marek Kozielhttp://lasu2string.blogspot.com/noreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-53451651708638356862009-01-27T10:53:17.000+00:002009-01-27T10:53:17.000+00:00It wouldn't be appropriate to make ?: mandator...It wouldn't be appropriate to make ?: mandatory because the programmer may know it is safe, but the compiler doesn't due to the lack of @NotNull or similar. While we can add appropriate @NotNull declarations to our own code, we may not be able to add it to other code that we use.<br />I remember the pain when 'const' was added to C++ and it took years for it to appear in library declarations.Mark Thorntonnoreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-14375662727593224762009-01-27T10:36:38.000+00:002009-01-27T10:36:38.000+00:00Jesse, while I support null-handling in the type s...Jesse, while I support null-handling in the type system (of which @NotNull is a very weak form) I cannot accept that it removes the need for null-handling operators.<br /><br />The ?: operator is needed just to handle auto-unboxing properly, as well as numerous other cases where defaulting a null-value becomes necessary. The ?. operator is a pragmatic response to the fact that nulls are already here, causing pain and not going away. Handling nulls today requires so much code that the true business logic of methods gets lost.Stephen Colebournenoreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-2512729305605891732009-01-27T09:58:01.000+00:002009-01-27T09:58:01.000+00:00Hi!
In my opinion votes should be split in:
- The...Hi!<br /><br />In my opinion votes should be split in:<br />- The problem:<br />--I have problem with that.<br />--It's problem but I don't mind to keep things unchanged.<br />--It's not problem for me.<br /><br />-Suggested solution:<br />--I like this proposal.<br />--No opinion<br />--I this this proposal is not good enough.<br /><br />-Other solution<br />--I think suggested one is good.<br />--No opinion<br />--I think better solution should be searched.<br /><br />That would help to obtain more competent opinions. Than [Yes 100% , Yes 50% , No ] voting.<br /><br />Greetings.Lasu aka Marek Kozielhttp://lasu2string.blogspot.com/noreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-28959152042353591132009-01-27T05:03:08.000+00:002009-01-27T05:03:08.000+00:00Null handling is bad 'cause it encourages appl...Null handling is bad 'cause it encourages applications to sweep nulls under the rug rather than dealing with 'em. Instead, applications should use JSR-305 annotations like @NotNull to prevent null creep.<br /><br />http://code.google.com/p/jsr-305/Jesse Wilsonhttp://publicobject.comnoreply@blogger.com