Hacker News new | past | comments | ask | show | jobs | submit login

> Also, typed function parameters are painful. Declaring a parameter as a `f: () -> int` instead of `f` requires that you think about what the signature needs to be. What if you don't know? What if you want to change it?

This is actually my favorite thing about languages with strong type systems where type inference is less emphasized -- if you're looking at a function definition, even if you're not terribly familiar with the language, you know what the thing is supposed to do. Sure, it's nice to let the compiler infer your types at compile or runtime, but it's really nice to just be able to read the code and be able to see what a function is at least meant to do, based on what it returns.




...and in fact this documentation effect is (so far) the only positive effect of static typing that has had at least some scientific validation.


?

This sounds really fishy to me. Do you have more details?

Source: have programmed professionally in major static and non-static languages and as the years pass I appreciate static languages more and more for each time I waste time debugging what I have learned to think of as stupid, completely avoidable errors.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: