knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
Q7 is a type system that enables a postmodern flavor of compositional object-oriented programming (OOP). It is simple, flexible and promotes healthy program design.
Q7 features:
type()
, feature()
and implement()
to compose objects;initialize()
and finalize()
to run at its beginning and end of life;public
, private
, final
, private_final
and active
binding modifiers to change the visibility and behavior of its members.# install.packages("devtools") devtools::install_github("iqis/Q7")
require(Q7)
Make a Q7 object in 3 easy steps.
1, Define an object type:
Adder <- type(function(num1, num2){ add_nums <- function(){ num1 + num2 } })
2, Instantiate the object:
myAdder <- Adder(1, 2)
3, Enjoy!
myAdder$add_nums()
See vignettes for extending an object and other topics.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.