Related articles |
---|
Reference to "First-Class Data Type" reid@vtopus.cs.vt.edu (1992-02-18) |
re: First-class data types lotus!wildbill@uunet.uu.net (1992-03-05) |
Re: First-class data types norman@a.cs.okstate.edu (1992-03-05) |
Re: First-class data types rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell) (1992-03-06) |
Re: First-class data types pk@cs.tut.fi (1992-03-06) |
Re: First-class data types kend@data.rain.com (1992-03-05) |
Re: First-class data types tmb@ai.mit.edu (1992-03-09) |
Re: First-class data types norman@a.cs.okstate.edu (Norman P. Graham) (1992-03-11) |
Newsgroups: | comp.compilers |
From: | pk@cs.tut.fi (Kellom{ki Pertti) |
Keywords: | types |
Organization: | Tampere Univ. of Technology, Finland. |
References: | 92-02-085 92-03-024 |
Date: | Fri, 6 Mar 1992 10:27:01 GMT |
In article 92-03-024 lotus!wildbill@uunet.uu.net (Bill Torcaso) writes:
There is a nit to pick with the definition of 'first class datatype'
that asserts any operation can be applied to any object of any first class
datatype. Consider a language in which functions are first-class:
What is the XOR of two functions? What is the AND of two functions?
The term `first class' is used in conjunction with Scheme to mean
that you can
- store a first class value in a data structure
- pass it as a parameter
- perform to it any operations *that are defined for it*
- some other things I may have missed
I would say that prohibiting passing a function as an argument
definitely makes it second class, whereas not defining some
operations, such as XOR, for it does not affect its fundamental
status. I do not view passing a value as a parameter as applying an
operation to the value, but as a entirely different thing.
There is a difference in a value being first class and a type
being first class. A first class datatype would mean by the
above definition that you can, for instance, pass a type as a
parameter. I tend to think that a `first class datatype' means a
type whose instances have a first class status, though.
--
Pertti Kellom\"aki (TeX format)
Tampere Univ. of TeXnology
Software Systems Lab
[Similar comments received from Geoffrey Clem and Markus Freericks. -John]
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.