Re:Overhead of Returning Optional Values in Java and Rust
by sushsjsuauahab on Saturday October 16, 2021 @02:32PM
(#28890204)
Well, it's not exactly a primitive (long) and instead it is an Object (Long), but I understand what you mean :)
Re:Overhead of Returning Optional Values in Java and Rust
by shawnz on Saturday October 16, 2021 @11:37PM
(#28893733)
OptionalLong is an object which optionally contains a value type (lowercase L) long. Optional<Long> is an object Optional which optionally contains an object Long.
Re:Overhead of Returning Optional Values in Java and Rust
by sushsjsuauahab on Sunday October 17, 2021 @03:35PM
(#28899112)
Oh nice! I should have checked the docs or Intellij to see that it returns the primitive type ;)
I thought longs were 64 bit signed integers in Java, what's the difference with a u64 in Rust? Is it the signedness that affects performance?
> OptionalLong
Thanks for the info! I didn't know there were Optional primitive types in Java!