4 ms·
> seriosuly Well, if English were statically typed, the compiler would have caught your spelling mistake before you submitted your comment. Types are valuable
by WayneBro 10y ago
> seriosuly
Well, if English were statically typed, the compiler would have caught your spelling mistake before you submitted your comment.
Types are valuable for any size application. They bring order to a chaotic world.
If you don't do static typing, you have to do a lot more unit testing. You also have to type out a lot of code to convert your function arguments into the types that you actually wanted. So, you're spending your time either way. Specifying types up front takes way less time than writing unit tests or converting arguments.
- koolba 10y ago> Well, if English were statically typed, the compiler would have caught your spelling mistake before you submitted your comment. Ha! I love seeing things like this on HN and think it's a perfect example to illustrate the power of static typing. Kudos!
- talmand 10y agoI fail to see what typing and a typo have to do with each other to make that joke worthwhile.
- koolba 10y ago> I fail to see what typing and a typo have to do with each other to make that joke worthwhile. Well to be fair it's more about static analysis vs catching typos though they tend to go hand in hand. I suppose a more apt analogy would be transposing a letter in the sentence where it was still spelled corrected but the part of speech changed from a noun to a verb.
- jasonkostempski 10y agoIt would have passed static checking if using UDL (Urban Dictionary Language).
- caub 10y agoI agree hehe, JS may possibly move more and more in this direction