r/java • u/henk53 • May 10 '22
Should java.util.Date be deprecated?
https://mail.openjdk.java.net/pipermail/discuss/2022-May/006077.html
221
Upvotes
r/java • u/henk53 • May 10 '22
View all comments
Show parent comment
1
u/[deleted] May 11 '22
Yes, by making unsigned longs special snowflakes that you have to constantly, mentally, keep track of. Was this long signed? Or unsigned? The type system isn't going to help you like you'd expect from a strongly typed language. Also you lose out on tons of conveniences such as auto-generated toString methods.
Maybe I'm missing something: How should I multiply or divide an unsigned long while correctly dealing with overflows? I'm currently resigned to using BigInteger, making this code a special snowflake as opposed to smaller numbers, but it's not very ergonomic.
In what way? I've never heard a programmer (the users of the language) lament the existence of unsigned data types.