Sep 1, 2018 · 1 min read
Does anyone find this feature a bit scary? Sure it’s fun and nice to have, but the possibility of abuse and misuse is huge. Especially in the second example (and yes, I know it’s just an example) — if you need a non-null string for later, you could easily return String? from the validator function and then do ?.let on it, that approach would also fix the problem. I just have a feeling that contracts would tempt people often to work around type safety (think of 3rd-party libs).
