For example, I could say:
deftype distancd from double;
deftype time from double;
deftype speed from distance/time;
deftype acceleration from speed/time;
distance d = 10.5;
time t = 1.2;
speed s = d/t; // okay
acceleration a = d/t/t; // okay
acceleration b = d/t; // error
Is there any programming language type system that supports this idea?
or this python library : https://github.com/katerina7479/python-units-of-measure