[r6rs-discuss] "Unspecified" (naming)
Jonathan A Rees
jar at mumble.net
Fri Sep 22 08:54:16 EDT 2006
On Sep 22, 2006, at 8:02 AM, Marcin 'Qrczak' Kowalczyk wrote:
> John Cowan <cowan at ccil.org> writes:
>
>> That said, I do think the expression "the unspecified value" is a
>> confusing one, and should be replaced by something else.
>>
>> How about "the content-free value"?
>
> I propose "void": it's an established practice in several languages,
> and it's rarely used with other meanings.
I believe "void" was coined by Algol 68 as a *type* having only one
value. C borrowed the term (along with "union", "cast", and some
others) from Algol 68 and also uses it to mean something resembling a
type. So if you have a value called "void" you will sneer at
precedent, and suffer more of my abuse, since "void" is not a value
in earlier languages.
Algol 68 has a way of writing a value of type "void", namely "empty".
Unfortunately "empty" is too useful a word to devote to this purpose;
e.g. it is too close to "empty list".
Andrzej Filinski, if I remember correctly, argues that the term
"void" ought to be reserved for a type that is devoid of values (as
opposed to a type of values that are devoid of information), although
he calls that type "zero" to avoid confusion and to nod at category
theory. Perhaps this is the reason why ML calls the type "unit" (a
type that has a single value) instead of "void".
I don't know what, if anything, ML calls the value of its unit type -
maybe "()" or "null".
Of course, in 1957 this thing was called "nil", and McCarthy may be
the most respectable precedent we have available.
But I still think specifying a value at all is contrary to what used
to be the language's goals. As this issue is separate from the naming
issue I'll explain separately (maybe in a couple of days).
More information about the r6rs-discuss
mailing list