Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Please put units in names. Parent comment
Many Languages
var lengthInFeet = 2; var weightInKg = 2; var sum = lengthInFeet + weightInKg; // Runs without issue but is an error
[<Measure>] type ft [<Measure>] type kg let lengthInFeet = 2<ft> let weightInKg = 2<kg> let sum = lengthInFeet + weightInKg // Compile time error
There are no comments on this comment yet.
Many Languages
F# More info at https://fsharpforfunandprofit.com/posts/units-of-measure/