Richard Maine wrote:
>
> I (Rich Maine) wrote sometime or other:
>
> > ]Indeed, notice, that "procedureness" can't even be used for generic
> > ]resolution. You can't have two specifics, one of which takes a real
> > ]data value, and the other of which takes a real function. You may,
> > ]however have two specifics, one of which takes a real function, and
> > ]the other of which takes an integer function. This is because
> > ]a real function and an integer function differ in type.
>
> and William F Mitchell writes:
> >
> > In trying to figure out how to handle that problem, I completely forgot that
> > in another case I was using integer value vs. subroutine as a distinguisher.
> > I guess from the first sentence of the last paragraph, Richard would agree
> > that such code is not standard conforming, but I'll let him speak for himself.
>
> Hmm. That one is subtle. I think my answer is that I don't know. A
> subroutine doesn't have a type. Is there a difference in type if one
> thing has a type (say integer) and the other has no type at all? That
> is can the lack of a type be considered to be a "null" type (one might
> even say a "void" type, but I think I'll avoid using that term) for
> purposes of making this comparison. I think I'd probably argue that
> you could, but I'm far from sure of myself here.
>
> To put it another way. If two thingos (to use a technical term :-))
> do not have the same type, does that mean that they differ in type?
> Or is there a third possibility - that type comparison makes no sense
> for them? One can define logical systems either way. Which is the
> "correct" interpretation is less clear to me.
Do have a look at the specs on Algol 68 here - under MODEs. The
Algol 68 def. is a mind-mangling mathematical monster - read a
text about this instead. Somehow, most languages that try to
deal with the difference between a function returning a type and
the type returned have some sort of syntax for the purpose, even
if it's a half-baked or inconsistent one. The old ISO Pascal has 4
kinds of parameters for functions and procedures, one being for
value parameters of the various kinds, one for Var (usually => call-
by-reference) parameters, one for function parameters and one for
procedure parameters, and doesn't specifically refer to such things
as the latter two as having types themselves. The various
Turbo(Borland) Pascals do have type declarations to create
function and procedure types and immediately run into the problem
of having to create a whole new set of rules for argument-parameter
compatibility for them.
Best wishes to the Fortran Standards people as they try to make
some sort of sense out of this problematic area for F2000.
--
John H. Lindsay [log in to unmask]
Department of Mathematics and Computer Science
ROYAL MILITARY COLLEGE OF CANADA
P O BOX 17000 STN FORCES
KINGSTON ON K7K 7B4 CANADA
Phone: (613) 541-6000--1--6419
Fax: (613) 541-6584
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|