we should remove integers and booleans from general purpose programming languages. only newtypes over them should be allowed.
we should remove integers and booleans from general purpose programming languages. only newtypes over them should be allowed.
counterpoint: if you do this, half of libraries will export an Int newtype
What if you really have a function using ints without a unit attached, e.g. computing the nth fibonacci number?
Or should such a function return a value of type "fibonacci"? And what is the input int-type?
I'm mostly joking (title imitates Jonathan Swift's "Modest Proposal" satire) on the basis of getting owned by a unitful number that was untagged, in Haskell's timeout. Generally you do actually need numbers for computing ;p