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

Abs Spurdle @purd|e@@ @end|ng |rom gm@||@com
Wed Mar 27 02:42:19 CET 2019


> 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]]



More information about the R-devel mailing list