4 ms·
> If I create a binding for X and initialize it to 1, the compiler should be able to figure out that X is an integer without my having to tell it. There are ma
by naasking 2y ago
> If I create a binding for X and initialize it to 1, the compiler should be able to figure out that X is an integer without my having to tell it.
There are many integral types, all of which have different properties, often for good reasons.
- lisper 2y agoSure, but often != always. And if your language forbids type inference then you are burdened with the cognitive load of worrying about types every single time whether there is a good reason in that instance or not.
- wesselbindt 2y agoThere's a difference between inference and coercion, and no one here is arguing against inference, as far as I can tell.