Kotlin has both. But why?
Nothing | Unit | |
as return type | the function either throws exception or runs infinite loop | there is nothing of interest to return |
meaning | this function never returns | the function performs side effect |
values | the Nothing type has NO values | the Unit type has single value (singleton) -> the Unit Object |