[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Disallow empty "or" type specifier
From: |
Peter Bex |
Subject: |
Re: [PATCH] Disallow empty "or" type specifier |
Date: |
Tue, 26 Sep 2023 11:59:12 +0200 |
On Tue, Sep 26, 2023 at 12:33:43PM +0300, elf wrote:
> It certainly shouldn't be *, nor should it be an error... technically an
> empty union should be a null set, which would correspond to either a
> non-extant type or to no return/value at all...
We've discussed this on IRC. Such a null type doesn't exist in Scheme,
and "no return value" would correspond to a zero "multiple return
values", which has a different notation in our type system.
The (or) is an individual value, which could occur multiple times in a
"multiple return values" list. We don't splice MV values together,
so this is either a null type or an error.
So in our case, it should definitely be an error since we don't have
null types.
Cheers,
Peter
signature.asc
Description: PGP signature