[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
New type specifier?
I propose adding a new type specifier, VOID. It is subject to the
same constraints as the VALUES specifier, and is used in a similar
way. (THE VOID xxx) indicates that it is an error to use the value(s)
of xxx, but the actual expression might evaluate to any number of
values of any type. This can also be used for
(FUNCTION foo (...) VOID), to indicate that the function has no
meaningful value.
Note that this is not the same as the NIL specifier (not to be
confused with NULL). (THE NIL xxx) is always erroneous, since no
expression can evaluate an object of type NIL. It has also been
suggested that (VALUES) be used when no useful value is returned. The
problem with this is that it is not erroneous for code to expect
values when there are none, so the compiler cannot give an error
message.
Rob