3 ms·
Spoken like someone who's never solved problems with medium-to-large scale JS projects... criticising people who have.
by inimino 6y ago
Spoken like someone who's never solved problems with medium-to-large scale JS projects... criticising people who have.
- holler 6y agoThat is one key thing I see a disconnect with. I definitely can see the value in having static types in a long-lived/large js project, but at the same time 1) how long does the average js project really stay relevant, 2) people have got by just fine w/o it so far. I’m kind of mixed on it, but for my new web app I’m working on I decided to use vanilla js because it feels much more efficient.
- WClayFerguson 6y agoAnd if you converted your code to TypeScript you'd immediately find the 100 or 1000 bugs you have that you're just unaware of until they bite. People who have done such a conversion before know this, and unanimously will agree. Those who have't are blissfully ignorant.
- WClayFerguson 6y agoHere's a pretty sizable project I wrote in pure TypeScript: https://github.com/Clay-Ferguson/quantizr https://github.com/Clay-Ferguson/quantizr I have 5 years experience in TS and 20 in JS. Trust me, if you don't yet understand the value of type-safety, it's only because you haven't lived long enough yet.
- inimino 6y agoI do understand the value, thanks mostly to Haskell. I also know that (language- or tool-enforced) type safety and type discipline are separable concerns. I also understand when the former gets in the way, thanks to JS, TS, Rust, Lisp, and projects large and small, slow and then fast, fast and then slow, slow and then slow, and fast and then fast.
- WClayFerguson 6y agoEvery developer, regardless of skill level, makes mistakes and typos. The beauty of type-safety in TypeScript is that the compiler catches it instantly, in a way that is simply humanly impossible. If I misspell something, or provide the wrong argument type to a method, or have args in wrong order, etc, it's caught instantly. With JS you can have a typo that causes user malfunctions for YEARS before being found by a developer and fixed. Any developer who's done many years of both TS and JS would never in a million years consider going back to JS. Absolutely out of the question.
- inimino 6y ago> Any developer who's done many years of both TS and JS would never in a million years consider going back to JS. Except, apparently, for the topic of this article. > If I misspell something, or provide the wrong argument type to a method, or have args in wrong order, etc, it's caught instantly. Yes, I've heard the pitch before. I've even given it more than a few times. Of course, if both of your arguments happen to be 64-bit floats, then the type system won't help you much if you get them in the wrong order. However, when you want to change that function to take a closure instead of a number, the type system can be invisible or it can fight you. Some of us love the structure that a type system can provide. Some of us, like the one who started this website we're on now, also appreciate the power of languages that get out of your way and let you make your own brilliant mistakes. And some of us can appreciate the beauty of different language designs and approaches, and try to rise above dogma. Which, if you've been in this line of work for 20+ years, should be you.
- WClayFerguson 6y ago> Except, apparently, for the topic of this article. Well, Deno devs did try to use TypeScript, and just ran into some challenges, and decided to throw the baby out with the bath water. I've seen this a lot in my 30yrs exp.: some developer/team runs into problems, gets frustrated, gives up, and decides the best decision is to remove some important piece rather than solve the actual problems. The reason Deno is giving up TypeScript is representative of failure, and not an indication them wanting JS instead of TS. What they want is TS. The rest of your reply is just stating some minor imperfections that are a billion miles from invalidating TS. And yeah, there's a place for JavaScript still, for small-scale tinkering, or perhaps even prototypes with only a few hundred lines of code. Any large scale project in JavaScript (not TS) is simply unfathomable to any modern developer worth his salt.