Hacker News new | ask | show | jobs
by ptx 810 days 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".

2 comments

Funny 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!

The 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.
I’m sincerely in awe at the cleverness of this bit of snark.