3 ms·
Yup! Especially using VsCode, which feels optimized for TS development. Click the var you want to rename, hit F2, rename it, and it renames all instances of the
by Jarwain 5y ago
Yup! Especially using VsCode, which feels optimized for TS development. Click the var you want to rename, hit F2, rename it, and it renames all instances of the var. If you're renaming an import, it'll do it across all the files automagically. Moving a file? Imports get updated too!
Plus you've got MS's intellisense powering autocomplete. Unfortunately, I don't think it can recognize different foods, but as long as you've typed your variables the autocomplete is pretty good!
EDIT: the OP had a typo, saying food instead of good, for context as to why I made a food joke
- bcrosby95 5y agoNone of this is better than the experience in Java though, which is what they were comparing it to. Maybe they were using shit tools?
- Jarwain 5y agoThe gp made this comment (https://news.ycombinator.com/item?id=27168048 https://news.ycombinator.com/item?id=27168048). > This biggest "aha" benefit I get from TypeScript is that it is structurally typed, while Java is nominally typed. In my experience it has proven much easier to refactor in TS because I just need to ensure my objects have all the right properties. With Java if I have a Thing1, but a library is updated to add just a single new property so now there is a Thing2 type, well now then all the places I need a Thing2 I have to completely copy over from Thing1 - I can't just add the property and be on my merry way. This happened to me many times in my Java career - I still think I have PTSD having to do a Jersey 1.x upgrade to a Jersey 2.x version across a large codebase. It was a nightmare I've never had anything come close to with Typescript. Not so much refactoring as upgrading, but tis an example of why duck typing is kinda nice
- wernercd 5y ago> maybe they were using shit tools They weren't using Java, so probably not. ZING! But seriously... If you want to compare tooling, you shouldn't be comparing a scripting language vs a language like Java... compare Java vs C# and C#'s experience is better than Java's IMO (not REAL experienced with Java but I've done some basic stuff).