-
Now require explicit
S4_register()
in order to use register R7 method for S4 method.S4_register()
creates full S4 class spec (#182, #214). -
Exported
class_factor
,class_Date
,class_POSIXct
, andclass_data.frame
. -
New
R7_inherits()
andcheck_is_R7()
(#193) -
new_class()
can create abstract classes (#199). -
method_call()
is nowR7_dispatch()
(#200). -
Can now register methods for double-dispatch base Ops (currently only works if both classes are R7, or the first argument is R7 and the second doesn't have a method for the Ops generic) (#128).
-
All built-in wrappers around base types use
class_
. You can no longer refer to a base type with a string or a constructor function (#170). -
convert()
allows you to convert an object into another class (#136). -
super()
replacesnext_method()
(#110).
-
class_any
andclass_missing
make it possible to dispatch on absent arguments and arguments of any class (#67). -
New
method_explain()
to explain dispatch (#194). -
Minor property improvements: use same syntax for naming short-hand and full property specifications; input type automatically validated for custom setters. A property with a getter but no setter is read-only (#168).
-
When creating an object, unspecified properties are initialized with their default value (#67). DISCUSS: to achieve this, the constructor arguments default to
class_missing
. -
Add
$.R7_object
and$<-.R7_object
methods to avoid "object of type 'S4' is not subsettable" error (#204). -
Dispatch now disambiguates between S4 and S3/R7, and, optionally, between R7 classes in different packages (#48, #163).
-
new_generic()
now requiresdispatch_args
(#180). This means thatnew_generic()
will typically be called without names. Eithernew_generic("foo", "x")
for a "standard" generic, ornew_generic("foo", "x", function(x, y) call_method())
for a non-standard method. -
new_external_generic()
now requiresdispatch_args
so we can eagerly check the signature. -
Revamp website. README now shows brief example and more info in
vignette("R7")
. Initial design docs and minutes are now articles so they appear on the website.
- New
props<-
for setting multiple properties simultaneously and validating afterwards (#149). - Validation now happens recursively, and validates types before validating the object (#149)
- Classes (base types, S3, S4, and R7) are handled consistently wherever they
are used. Strings now only refer to base types. New explicit
new_S3_class()
for referring to S3 classes (#134). S4 unions are converted to R7 unions (#150). - Base numeric, atomic, and vector "types" are now represented as class unions (#147).
- Different evaluation mechanism for method dispatch, and greater restrictions on dispatch args (#141)
x@.data
->R7_data()
; probably to be replaced by casting.- In generic,
signature
->dispatch_args
. - Polished
str()
andprint()
methods new_class()
has properties as 3rd argument (instead of constructor).