gramOf
gramOf is a conceptual programming construct or library that facilitates the creation of programs where specific units of measurement are inherently tracked and managed. It aims to prevent common errors related to unit mix-ups, such as adding meters to seconds or multiplying kilograms by liters without proper conversion. The core idea behind gramOf is to imbue variables and operations with unit information, making it impossible to perform incompatible operations at compile-time or runtime, depending on the implementation.
This approach allows developers to define quantities with their associated units, for example, "5 kilograms" or
The benefits of using a gramOf-like system include increased code safety, improved readability, and reduced debugging