The NaN of types (in D)
Imperatorn
johan_forsberg_86 at hotmail.com
Mon Oct 12 11:59:15 UTC 2020
On Monday, 12 October 2020 at 11:55:38 UTC, Imperatorn wrote:
> On Monday, 12 October 2020 at 08:52:22 UTC, Ola Fosheim Grøstad
> wrote:
>> On Monday, 12 October 2020 at 06:41:26 UTC, Imperatorn wrote:
>>> The empty type cannot be a return type
>>
>> It can be a return type, but you probably meant that a
>> function with a bottom type as a return value does to return
>> normally.
>>
>> A function that always returns by exception would have a
>> bottom type as the return type.
>
> "A function whose return type is bottom cannot return any
> value, not even the zero size unit type. Therefore a function
> whose return type is the bottom type cannot return."
https://docs.python.org/3/library/typing.html#typing.NoReturn
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-nothing.html
https://doc.rust-lang.org/std/primitive.never.html
More information about the Digitalmars-d
mailing list