From @purd|e@@ @end|ng |rom gm@||@com  Wed Mar 27 02:42:19 2019
From: @purd|e@@ @end|ng |rom gm@||@com (Abs Spurdle)
Date: Wed, 27 Mar 2019 14:42:19 +1300
Subject: [Rd] Discrepancy between is.list() and is(x, "list")
In-Reply-To: <CAD4oTHFMC=9__Qn=4CVjotHnVDoZii1KBx_ckbZ=74ATgtZYcQ@mail.gmail.com>
References: <CAB8pepyU2qbU7fd1J9J6kyr_657PHFYHoJV6fnvNiHqqjq-24w@mail.gmail.com>
 <EB8494AA-8DAA-4B9A-B636-7E979251EF0C@ucsd.edu>
 <CAB8pepxp9TL18vvHajvSJBXhJY=E13ZWUjebxv6OdgPXcWVPTQ@mail.gmail.com>
 <CAD4oTHFMC=9__Qn=4CVjotHnVDoZii1KBx_ckbZ=74ATgtZYcQ@mail.gmail.com>
Message-ID: <CAB8pepznVQ6jG2Lx4sJw3GS5xMS7u3jeVn3BxaR9e122NdV=uA@mail.gmail.com>

> you had seemed to be presenting it as something new in 3.5.3. I would be
surprised if the behavior doesn't go all the way back to whenever
head.function was added.

My bad.
I'm just surprised I've never noticed these problems before.

> S3 classes have no formal definitions at all
> I'm not sure what is clear about that, or what class hierarchy you're
talking about in the S3 case.

That's questionable.
One, because it depends on how you define formal definitions.
And two, because class definitions can exist outside the code itself.
e.g. As part of an object oriented model.
(Being "Object Oriented" is just as much about models as it is about
syntax).

Furthermore, when you change the class of a vector, list or function, much
of the original object's structure and behavior remains.
So, it has "Inherited" or "Extended", in my opinion.
Resulting in a class hierarchy.

> Dispatch is ONLY done on the class vector for S3 (AFAIK)

Incorrect.
We've already mentioned the example of head.function().
In general, this dispatch occurs without the presence of a class attribute.

> You seem to be approaching the S3 "class"/dispatch system as something
that it is not: a formal class system

If I can diverge...

Where did this term "Formal Class System" come from?
I've never seen it used anywhere else.
Is is specific to R?

	[[alternative HTML version deleted]]



[Rd] Discrepancy between is.list() and is(x, "list")
Abs Spurdle