4 ms·
I have pretty much the exact opposite view: I find type signatures add noise I don't want, while I find {} to be suboptimal for large blocks. I prefer the Ruby
by vidarh 13y ago
I have pretty much the exact opposite view: I find type signatures add noise I don't want, while I find {} to be suboptimal for large blocks. I prefer the Ruby approach, where what you described would usually be:
if
...
else
...
end
So it cuts down on the clutter vs. Pascal, but sticks to words rather than single character symbols
- paulrademacher 13y agoWhat you call "noise" is the compiler catching a type-mismatch bug before it goes out into production.
- vidarh 13y agoType errors are typically trivially caught with units tests that are necessary to verify functionality anyway. I used to be a strong believer in static typing and insist that dynamic typing would be extremely error prone, but when I actually tried it, I found that the additional testing required is pretty much non-existent - if you test properly, you tend to cover types as a side effect. I'd still prefer static typing, but only if it doesn't get in the way. And that means minimal annotations, and minimal restrictions.
- pjmlp 13y agoWorking in the enterprise, with off-shored project modules, will restore your faith in static typing. :)