R/zzz_package_doc.R

#' Adds an enumeration data type for R to support list of allowed value/label pairs
#' 
#' Enumerations are lists of value/label pairs (lists of constants for values).
#' Enums make code more readable.
#' You can use an enumeration type as formal function parameter to allow only values
#' of the enumeration passed in (other values throw an error).
#' 
#' @docType package
#' @name R_enumerations
NULL



# TODO package doc
# - What is an enum?
# - How is it used in R?
# - How is it implemented in R`
# - Which implementation alternatives exist?
# - Reason to choose this implementation?

# Explain enum advantages
#   - code readability (clear constant names instead of magic codes and numbers)
#   - documentation of allowed values ("states")
#   - usability (intellisense/code completion helps to select one of the allowed values)
#   - ...

# Explain enum use cases
#   - as function parameter
#   - ...
aryoda/R_enumerations documentation built on Sept. 8, 2018, 8:30 p.m.