Hacker News new | ask | show | jobs
by pmarreck 3619 days ago
If you like types, why would you use TypeScript over Elm? http://elm-lang.org/
1 comments

Because I like optional types. I don't like the type system dictating the entire design.
I like optional types as well, but more because I'm lazy. The Elm and Haskell people are not complaining about types, and given that every function takes SOMEthing (of some implicit type) and usually spits out SOMEthing (of some implicit type), I can hardly see how it will "dictate the design" more than create a bit more validation code.
Not having this flame war. I have my reasons, you have yours. We will continue writing code using our separate ways. Certain patterns are awkward or even impossible in statically typed languages and you need to bypass the type system to get things done so implicit or not, static type systems have a cost. There is a benefit as well but the kinds of systems I work on I don't need the extra validation. I need the ability to quickly prototype and ship and then layer on the validation, hence the need for optional types.
Didn't think I was starting a flame war, I thought we were having a stimulating discussion, actually, but the two are often confused online unfortunately. I don't use any statically typed languages myself, so there is no reason for me to advocate for them from a personal bias standpoint, I was just saying that the people who DO use them seem to be pretty sold on them. Your criticisms are valid of course!