2 ms·
Got me thinking. Are there tools out there that solidify "auto"s into their types? Type inference is fast but what if I want to eventually lock it down and prev
by Waterluvian 8y ago
Got me thinking. Are there tools out there that solidify "auto"s into their types? Type inference is fast but what if I want to eventually lock it down and prevent accidental changes in type by adding a decimal or whatnot.
- skybrian 8y agoAn IDE could do it, but the risk for local variables seems smaller compared to the confusion when someone accidentally changes the input or output of a function.
- SatvikBeri 8y agoThe Jetbrains IDEs let you do this pretty easily, at least for Python and Scala (and presumably for Java & Typescript.)