What if Java was more like Rust?
- A
Result
class following the specification of Rust’sstd::result::Result
with 1 of the 2 possible types:Ok
orErr
. - Sane conversions from
java.lang.String
tobyte
,int
,long
without the need for:
try {
/* assignment */ Integer.parseInt(someQuestionableStringWeGotAsInput);
}
catch (NumberFormatException ex) {
// do something
}
null
safety for everything in this library.
<dependencies>
<dependency>
<groupId>com.gitlab.mercur3</groupId>
<artifactId>jrusty</artifactId>
<!-- the version you want to use, but prefer the latest -->
<version>XXX</version>
</dependency>
</dependencies>
dependencies {
// the version you want to use, but prefer the latest
implementation 'com.gitlab.mercur3:jrusty:XXX'
}