Re:On Comments in Code
by adrian_b on Wednesday June 16, 2021 @05:38AM
(#27526616)
While what you say about long variable names can be right in certain circumstances, the example with the wrong units is inappropriate.
In my opinion any code that deals with physical quantities, but which does not use dedicated types for each kind of physical quantity, where the type definitions include the units used, is erroneous.
Any mistake like in the Mars orbiter must be detected at compile time.
In my opinion any code that deals with physical quantities, but which does not use dedicated types for each kind of physical quantity, where the type definitions include the units used, is erroneous.
Any mistake like in the Mars orbiter must be detected at compile time.