3 ms·
One thing that's left out of here is compile time. In one Swift project which was making heavy use of generics, I was able to decrease the compile time by doub
by skohan 7y ago
One thing that's left out of here is compile time. In one Swift project which was making heavy use of generics, I was able to decrease the compile time by double digit percentages by declaring types explicitly in a few places.
Also I've noticed in experimenting with Rust lately that use of type inference in code examples slows down the learning process. Often times I have to look up a few method signatures to figure out exactly what's happening in a given code block.
That said, I can't imagine working in modern languages without type inference altogether. I tend to agree with the last argument that the author doubts: if I repeat redundant type information several times in a scenario where it should be obvious, that makes my code less clear.