This document discusses using reference classes in R to efficiently fit and compare power law and other distributions. It presents a case study using the poweRlaw package to analyze word frequencies in Moby Dick. The package uses reference classes to represent distributions as mutable objects with a consistent interface for fitting, bootstrapping, model selection and more. This allows distributions to be efficiently compared and avoids constant data copying that would slow down calculations.