Nothing vs. Unit

Kotlin has both. But why?

NothingUnit
as return typethe function either throws exception
or runs infinite loop
there is nothing of interest
to return
meaningthis function never returnsthe function performs side effect
valuesthe Nothing type has NO valuesthe Unit type has single value
(singleton) -> the Unit Object
comparison between Nothing and unit Types in Kotlin