Skip to content
Prev 56546 / 63421 Next

Discrepancy between is.list() and is(x, "list")

If I can merge this thread with the one I started yesterday...
class..."
does not also have an implicit class.
stores values as "numeric":
here could create problems.

I disagree.
A date object should probably extend integers rather than numerics, in the
first place.
However, if it extends numeric, then it extends numeric, otherwise it's a
contradiction.
So, inherits(Sys.Date(),"numeric") should return true.

Modulo operators should be defined for both dates and numerics.
However, the application of modulo operators to dates, is perhaps unclear,
at least in the general case, anyway.
to 3.5.3.

These seem like significant design flaws.
Implicit classes or whatever you want to call them, are clearly part of the
class hierarchy.

They should be included in inherits(), is() and standard method dispatch,
regardless of whether they are part of the class vector or not.

Also, is this something that was introduced in R 3.5.1?
The only thing worse than a design flaw is a design flaw that isn't
backward compatible.