3 ms·
What programming languages need is dimensional analysis. The fact that I can make variables like Const km = 1 Const velocity = 11 And do km + velocity = 12 is
by drbojingle 1y ago
What programming languages need is dimensional analysis. The fact that I can make variables like
Const km = 1
Const velocity = 11
And do km + velocity = 12 is all kinds of silly.
- erichocean 1y agoWhat programming languages need is linguistic analysis. The fact that I can make variables like Const true = False Const false = True And do if (true) "won't happen" else if (false) "will happen" is all kinds of silly.
- zupa-hu 1y agoThat exists, it is called a nominal type system, while in your example the language has a structural type system. Edit: Assuming your example is even statically typed.