Yeah, physical dimensions are one of the few concrete static types one can beneficially leverage at the start of a project. They describe an uncommonly well defined domain logic polished over centuries. What I tried to demonstrate that algebraically correct expression does not necessarily imply correct domain logic and a physics calc was the most simple example I could come up wit.
Too bad only a few languages like F# come with dimensions attached to numbers out of the box :)
Too bad only a few languages like F# come with dimensions attached to numbers out of the box :)