Without a constructor

Type initialization / Structures

# A structure is a named list
size <- list(width = 0, height = 0)
size$width <- 10
size$height <- 10

point <- list(top = 0, left = 0)
point$top <- 5
point$left <- 5

# Set later
rect <- list(size = NULL, point = NULL)
rect$size <- size
rect$point <- point

cat("rect$point$left =", rect$point$left, "\n")
cat("rect$size$height =", rect$size$height, "\n")