Our great sponsors
-
NullAway
A tool to help eliminate NullPointerExceptions (NPEs) in your Java code with low build-time overhead
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Does anyone have experience using this at Meta who can compare to https://github.com/uber/NullAway ?
Whoa, interesting. I didn't know Kotlin had all those constructs.
In Virgil, a method on an object (or ADT) can declare its return type as "this". Then the method implicitly returns the receiver object. That trick is very useful to allow a chain of calls such as object.foo().bar().baz(). I find it readable and easy to explain:
https://github.com/titzer/virgil/blob/master/doc/tutorial/Re...
Oh yeah, I wrote one of those, too, complete with safe navigation through type aligned sequences etc. https://github.com/cosee/null4j
If I were still writing Java I would throw in some exception throw/catching based Haskell style do notation for binding nullables, i.e.
var nullableResult = nullable(() -> {