README.md

Q7

Lifecycle:
experimental Travis build
status

Q7 is a type system that enables a postmodern flavor of compositional object-oriented programming (OOP), a simple and flexible paradigm, leaving behind the grand narrative of classical heriditary OOP.

Q7 features:

Installation

# install.packages("devtools")
devtools::install_github("iqis/Q7")
require(Q7)
#> Loading required package: Q7
#> Loading required package: magrittr

Example

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()
#> [1] 3

Features

Smart Objects
Compositional Construction
No Magic

Origin of the Name

The package was named tounge-in-cheek foo for Freestyle Object Orientation, but the author soon realized the smart-a** name is going to backfire and cause real confusions. The latest OO system in R’s ecosystem has been S3, S4, S5(RC) and R6. So the author dialed the alphabet up and the numberal down: Q7, the next-in-line, with a distinct philosophy. Trivia: Both R6 and Q7 are model names of motor vehicles.



iqis/foo documentation built on June 7, 2020, 5:15 a.m.