Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Java is unsound - an interesting article

 
Bartender
Posts: 2235
63
IntelliJ IDE Firefox Browser Spring Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
https://dev.to/rosstate/java-is-unsound-the-industry-perspective
 
Marshal
Posts: 71715
312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
João told me about that article yesterday. He said it has to do with nulls, so I told him you can do daft things like:-
((Arrays)null).sort(myArray);
I tried the example they showed with the raw type of List and they are incorrect; the code does not type check. As I had expected, the compiler produces a warning. What does Joshua Bloch say in Effective Java? He says you are type‑safe as long as you don't get any warnings and only write @SuppressWarnings when you are absolutely sure about it. I think they are mistaken to imply the compiler is broken.

I shall ask João for the actual paper.
 
Always! Wait. Never. Shut up. Look at this tiny ad.
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic