Skip to content

Implement Units of Measure or a broader class of similar contracts #144

@dsaf

Description

@dsaf

F# is the inspiration:

https://msdn.microsoft.com/en-us/library/dd233243.aspx

This could be user-configurable, however:

"Units of measure are used for compile-time unit checking but are not persisted in the run-time environment. Therefore, they do not affect performance."

"Units of measure are used for static type checking. When floating point values are compiled, the units of measure are eliminated, so the units are lost at run time. Therefore, any attempt to implement functionality that depends on checking the units at run time is not possible. For example, implementing a ToString function to print out the units is not possible."

Perhaps it could be an additional feature to the ones already requested such as method pre- and post- conditions etc.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions