When to Use TypeScript – A Detailed Guide Through Common Scenarios
41–50 of 244 posts
Re: When to Use TypeScript – A Detailed Guide Through Common Scenarios
#42Earlier quoted context omitted.
You don't need to rewrite to add types.
In theory maybe you are right. In practice it never just adding types. E.g. you need to add null checks, rewrite old parts to follow same style (in case there are old parts in the code) and etc.
Re: When to Use TypeScript – A Detailed Guide Through Common Scenarios
#43It's a default for me now, on every new project. It doesn't slow down development because TypeScript allows you to easily "step down" type constraints as desired, and writing nontrivial code without any kind of type hints is just unimaginable to me now.
I also feel unit-level tests are less necessary with TypeScript. I used to write a lot of JavaScript tests that essentially just confirmed that "this sh*t is all tied together correctly". With TypeScript, if a code change or refactor broke something structural, you know immediately!
Re: When to Use TypeScript – A Detailed Guide Through Common Scenarios
#444 of the most popular language creators here https://www.youtube.com/watch?v=csL8DLXGNlU agree that type systems are useful. I would suggest definitely not using Vanilla JS. There are excellent type systems over JS, TypeScript, Scala.JS, BuckleScript to name a few each with their pros and cons (I don't know what cons BuckleScript has though, maybe relatively smaller lib-ecosystem)
Re: When to Use TypeScript – A Detailed Guide Through Common Scenarios
#45> will most often write vanilla React.js apps when: the codebase is small This one never ceases to amaze me. Any codebase is small, until it gets big. And once it's big, the effort to rewrite is hard to justify. You don't build a house and add the foundation later.
I see so many HN comments endorsing "build the product to exact specification using the minimum reasonable tool set." When you then ask "what happens when the specification changes?" you get hilarious answers like "just say no to the user", or "just extend the app!" This is why I always over engineer a bit, especially on new projects. I'll happily, for instance, add a framework before it's strictly necessary. I've ne…
The problem with overengineering is that you don’t have a good grasp on a generalized architecture until you have two or three use cases. Of course anything dealing with cross cutting concerns like logging and authentication it’s easier to add up front.
I don’t know any modern front end frameworks, but when working within a team, I’m all for opinionated popular frameworks. It’s s lot easier to onboard people and from a completely selfish standpoint, developers who are concerned with their careers want to be able to put a transferable toolset on their resume.
Re: When to Use TypeScript – A Detailed Guide Through Common Scenarios
#46There is no evidence presidented whatsoever in this article. It also seems that this person hasn’t worked with a numbered and diverse enough set of clients to even warrant listening to him as a practioner.
He’s peddling tired DDD tropes amongst a spattering of meandering well worn blog posty unsciencey ideas he’s read throughout the years.
Re: When to Use TypeScript – A Detailed Guide Through Common Scenarios
#47> will most often write vanilla React.js apps when: the codebase is small This one never ceases to amaze me. Any codebase is small, until it gets big. And once it's big, the effort to rewrite is hard to justify. You don't build a house and add the foundation later.
do y'all work on the linux kernel or what ? most of the projects I've seen across multiple jobs are less than 5000 loc. And they never will "get bigger" because they are not "products" that get evolved over time.
Re: When to Use TypeScript – A Detailed Guide Through Common Scenarios
#48It's a default for me now, on every new project. It doesn't slow down development because TypeScript allows you to easily "step down" type constraints as desired, and writing nontrivial code without any kind of type hints is just unimaginable to me now.
I don’t know about the rest of the world, but I’ve never once been slowed down by a compiler saying “It won’t work like that. Don’t waste your time”.
Re: When to Use TypeScript – A Detailed Guide Through Common Scenarios
#49It's a default for me now, on every new project. It doesn't slow down development because TypeScript allows you to easily "step down" type constraints as desired, and writing nontrivial code without any kind of type hints is just unimaginable to me now.
> unimaginable I imagine adding types gradually as a design solidifies, rather than slow velocity early on. Best not to be dogmatic on these things.
Types don't slow me down, and I can't imagine working without them.
Re: When to Use TypeScript – A Detailed Guide Through Common Scenarios
#50Isn't anyone worried that TypeScript will go the way of CoffeeScript?