Object-Oriented Programming
Objects as closures#
It can be succinct to implement an object using closures. Here is an excellent example from Ross and Robert (1996), p.304:
R6 style of declaration#
The sketch package supports object declaration using the R6 OOP syntax. Here is an example: