I mean, generally I would love (more) union types, unfortunately so few languages have them. For Ops requirement I think it's too specific for a language level feature. In Kotlin you'd just use a sealed type in the…
> Well, try to minimize the usage of nulls in your programs then :D I am a java guy since 1.1 and it seems to me that a lot of problems in Java come down to it being designed for a time when a application mainly…
When I first got into Kotlin I thought that null safety was a matter of getting rid of null, like some try to do in their Java code. Now I know that actually it gives me liberty to safely use null wherever I want and…
basically that's how it works in Kotlin (and Dart and others) already. String? is String|null and it's a compiler error to reference a member without a prior null check. In Kotlin (and others) it's extremely ergonomic,…
I mean, generally I would love (more) union types, unfortunately so few languages have them. For Ops requirement I think it's too specific for a language level feature. In Kotlin you'd just use a sealed type in the…
> Well, try to minimize the usage of nulls in your programs then :D I am a java guy since 1.1 and it seems to me that a lot of problems in Java come down to it being designed for a time when a application mainly…
When I first got into Kotlin I thought that null safety was a matter of getting rid of null, like some try to do in their Java code. Now I know that actually it gives me liberty to safely use null wherever I want and…
basically that's how it works in Kotlin (and Dart and others) already. String? is String|null and it's a compiler error to reference a member without a prior null check. In Kotlin (and others) it's extremely ergonomic,…