3 ms·
> Type inference is bad. It makes code harder to read, and languages that use it too much are harder to write. If inference is bad, maybe the second sentence s
by ptx 3y ago
> Type inference is bad. It makes code harder to read, and languages that use it too much are harder to write.
If inference is bad, maybe the second sentence shouldn't leave it up to the reader to infer what "it" means. Surely it would be much easier to read as "Type inference [...] type inference [...] type inference".
- eyelidlessness 3y agoI’m sincerely in awe at the cleverness of this bit of snark.
- williamcotton 3y agoFunny enough this is the approach taken in legal writing as to limit misinterpretation... especially purposeful misinterpretation from opposition legal teams! This results in highly repetitive, and as you've pointed out, somewhat tedious reading. F# is my daily driver at work and I definitely benefit from both the type inference as well as my IDE making those types explicit for my reading pleasure!
- karmakaze 3y agoThe type inference in F# is somewhat limited in a pleasing way. It prevents getting too far lost without doing yourself the favor of adding types here and there. My understanding was that it was a deliberate choice to simplify/speed up compilation.