Matias Radzinski
1 min readMay 15, 2017

--

Nothing IMHO has little but no use in real life scenarios. A function that never returns means that it’s a function that only throws exceptions (1, 2 or whatever the amount of exceptions that you wanna throw, maybe based on conditions, but always throw). In such scenarios, Kotlin guidelines recommend (as with Unit) not to specify the return type of the function. So, in other words: fun fail(): Nothing is an anti-pattern of the language itself and thus should be avoided.

--

--

Matias Radzinski
0 Followers

Android and Open Source Advocate. Trying to make ripples through space and time. Coffee lover.