4 ms·
> Typescript. You pretty much need that on any reasonable size project unless you are happy to spend your life tracking down runtime bugs. This is the original
by orange8 7y ago
> Typescript. You pretty much need that on any reasonable size project unless you are happy to spend your life tracking down runtime bugs.
This is the original grandparent comment I was responding to. To me, this sounds like the belief that only one language can solve a problem which I disagree with. TypeScript is not a silver bullet. They are all just tools. Pick the ones that work for you, but do not go and start preaching about your toolset being the one and only true path to code nirvana.
> ...and every programming language being equally bad.
I simply did not say that.
- jolux 7y ago>I simply did not say that. No, you're right, what you said is that there is no perfect programming language, and that they all have warts and problems. On that I agree with you, but in this case you seem to be using it to suggest that the language doesn't matter and it's all or even mostly a question of personal discipline, which I completely disagree with. Correct me if I'm wrong. >To me, this sounds like the belief that only one language can solve a problem which I disagree with. I disagree with that interpretation too, but the argument they were actually making was about static type systems, as evidenced by their comment about React and the importance of type checking. TypeScript is merely the most popular typed JavaScript variant. >TypeScript is not a silver bullet. Sure, I would actually prefer a much stronger type system than it provides, but it's certainly better than nothing. >They are all just tools. Sure, but some tools work better than others. >Pick the ones that work for you, but do not go and start preaching about your toolset being the one and only true path to code nirvana. I didn't see the grandparent preaching about "code nirvana" at all. They were making a pretty typical argument about the outsize effectiveness of static types in large codebases. It's entirely possible that programming in a large codebase with TypeScript sucks, but that programming in a large codebase with JavaScript sucks more. There is no perfect programming languages, but there are definitely better ones.
- orange8 7y agoI get it. You like TypeScript, it works for you. You like and firmly believe in static types, also great. No one is asking you to stop using them, or suggesting that they are bad. They are all just tools, use the ones that work for you. Personally, I do not need TypeScript, ESlint gets me there, but then again I'm not you. Just like I'm not going to assume your code is completely perfect and bug free because you use tool X, you should not assume mine is bad and buggy because I use tool Y.
- jolux 7y agoI’m not assuming it’s bad and buggy code. My day job is writing Elixir, albeit with full type spec coverage, and the code is fine. But that’s enabled by an extensive test suite, as well as type specs. Do we need these things, strictly speaking? No. But we don’t really need any of the tools we build and use, yet we build them because they make certain things easier and more reliable. My code is not perfect and bug free when I write it in a strongly typed language, however it is guaranteed to be free of type errors provided the type system is sound. That level of confidence in types is just not possible in a dynamic language.
- orange8 7y ago> it is guaranteed to be free of type errors provided the type system is sound Give me an example of a sound type system.
- jolux 7y agoSTLC
- orange8 7y ago> STLC Software Testing Life Cycle? That is not a type system, that is a software development methodology. Thought you'd mention atleast TypeScript or Elixir, but no, you went for the a whole software development methodology. Which kind of puts you in a bind now, since you also said: "..it is guaranteed to be free of type errors provided the type system is sound". So where does that leave us if you cannot confidently give an example of a sound type system? > That level of confidence in types is just not possible in a dynamic language. Not possible with static languages either, unless ofcourse you use the whole "Software Testing Life Cycle". Do you know what I like most about STLC? It advocates what I have been saying all along: discipline and best practice!!! And you can use STLC with dynamic languages to and get the same benefits.
- deleted 7y ago[deleted]